3 <script src="../../resources/run-after-display.js"></script>
6 transform: translatez(0);
19 background-color: blue;
27 background-color: cyan;
34 height: 50px; width: 50px;
35 background-color: lightslategray;
42 internals.settings.setLayerSquashingEnabled(true);
43 if (window.testRunner) {
44 testRunner.dumpAsText();
45 testRunner.waitUntilDone();
50 runAfterDisplay(executeTestCases);
53 function executeTestCases()
55 window.internals.startTrackingRepaints(document);
56 document.getElementById('Case1').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
57 window.internals.stopTrackingRepaints(document);
59 window.internals.startTrackingRepaints(document);
60 document.querySelector("#inner").style.backgroundColor = 'red';
61 document.getElementById('Case2').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
62 window.internals.stopTrackingRepaints(document);
64 // Display the test results only after test is done so that it does not affect repaint rect results.
65 document.getElementById('testResults').style.display = "block";
67 if (window.testRunner)
68 testRunner.notifyDone();
72 <body onload="runTest()">
73 <div class="composited box behind"></div>
80 <div id="testResults" style="display:none">
81 CASE 1, original layer tree
82 <pre id="Case1"></pre>
84 CASE 2, change color of "inner" to red
85 <pre id="Case2"></pre>