3 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
6 transform: translatez(
0);
19 background-color: blue;
27 background-color: cyan;
34 height:
50px; width:
50px;
35 background-color: lightslategray;
41 if (window
.testRunner
) {
42 testRunner
.dumpAsText();
43 testRunner
.waitUntilDone();
48 runAfterLayoutAndPaint(executeTestCases
);
51 function executeTestCases()
53 window
.internals
.startTrackingRepaints(document
);
54 document
.getElementById('Case1').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
55 window
.internals
.stopTrackingRepaints(document
);
57 window
.internals
.startTrackingRepaints(document
);
58 document
.querySelector("#inner").style
.backgroundColor
= 'red';
59 document
.getElementById('Case2').textContent
= window
.internals
.layerTreeAsText(document
, internals
.LAYER_TREE_INCLUDES_REPAINT_RECTS
);
60 window
.internals
.stopTrackingRepaints(document
);
62 // Display the test results only after test is done so that it does not affect repaint rect results.
63 document
.getElementById('testResults').style
.display
= "block";
65 if (window
.testRunner
)
66 testRunner
.notifyDone();
70 <body onload=
"runTest()">
71 <div class=
"composited box behind"></div>
78 <div id=
"testResults" style=
"display:none">
79 CASE
1, original layer tree
80 <pre id=
"Case1"></pre>
82 CASE
2, change color of
"inner" to red
83 <pre id=
"Case2"></pre>