Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Side by Side Diff: LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer.html

Issue 181653006: Remove testRunner.display() from most compositing/ tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert change to plugin test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/run-after-display.js"></script>
4 <style> 5 <style>
5 div { 6 div {
6 position: absolute; 7 position: absolute;
7 z-index: 1; 8 z-index: 1;
8 width: 100px; 9 width: 100px;
9 height: 100px; 10 height: 100px;
10 } 11 }
11 12
12 .composited { 13 .composited {
13 -webkit-transform: translatez(0); 14 -webkit-transform: translatez(0);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 .green { 46 .green {
46 background-color: green; 47 background-color: green;
47 } 48 }
48 49
49 #testResults { 50 #testResults {
50 display: none; 51 display: none;
51 } 52 }
52 53
53 </style> 54 </style>
54 <script> 55 <script>
55 if (window.testRunner) 56 if (window.testRunner) {
56 testRunner.dumpAsText(); 57 testRunner.dumpAsText();
58 testRunner.waitUntilDone();
59 }
57 60
58 if (window.internals) 61 if (window.internals)
59 internals.settings.setLayerSquashingEnabled(true); 62 internals.settings.setLayerSquashingEnabled(true);
60 63
61 function runTest() 64 function runTest()
62 { 65 {
63 if (!window.internals) 66 if (!window.internals)
64 return; 67 return;
68 runAfterDisplay(executeTestCases);
69 }
65 70
66 testRunner.display(); 71 function executeTestCases()
67 72 {
68 // Case 1 73 // Case 1
69 document.getElementById('Case1').textContent = window.internals.layerTre eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); 74 document.getElementById('Case1').textContent = window.internals.layerTre eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
70 75
71 // Case 2 76 // Case 2
72 window.internals.startTrackingRepaints(document); 77 window.internals.startTrackingRepaints(document);
73 document.getElementById("forceComposited").className = "underneath"; 78 document.getElementById("forceComposited").className = "underneath";
74 document.getElementById('Case2').textContent = window.internals.layerTre eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); 79 document.getElementById('Case2').textContent = window.internals.layerTre eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
75 window.internals.stopTrackingRepaints(document); 80 window.internals.stopTrackingRepaints(document);
76 81
77 // Display the test results only after test is done so that it does not affect repaint rect results. 82 // Display the test results only after test is done so that it does not affect repaint rect results.
78 document.getElementById('testResults').style.display = "block"; 83 document.getElementById('testResults').style.display = "block";
84
85 if (window.testRunner)
86 testRunner.notifyDone();
79 } 87 }
80 </script> 88 </script>
81 </head> 89 </head>
82 90
83 <body onload="runTest()"> 91 <body onload="runTest()">
84 92
85 <p>A squashing RenderLayer that becomes non-composited should correctly send 93 <p>A squashing RenderLayer that becomes non-composited should correctly send
86 a repaint invalidation to the new container GraphicsLayer that it paints 94 a repaint invalidation to the new container GraphicsLayer that it paints
87 into. When run interactively, hovering over the force-composited gray div 95 into. When run interactively, hovering over the force-composited gray div
88 should not cause other layers to disappear.</p> 96 should not cause other layers to disappear.</p>
89 97
90 <div id="forceComposited" class="composited underneath"></div> 98 <div id="forceComposited" class="composited underneath"></div>
91 <div id="A" class="overlap1"></div> 99 <div id="A" class="overlap1"></div>
92 <div id="B" class="overlap2"></div> 100 <div id="B" class="overlap2"></div>
93 <div id="C" class="overlap3"></div> 101 <div id="C" class="overlap3"></div>
94 102
95 <div id="testResults"> 103 <div id="testResults">
96 CASE 1, original layer tree: 104 CASE 1, original layer tree:
97 <pre id="Case1"></pre> 105 <pre id="Case1"></pre>
98 106
99 CASE 2, The original composited layer is no longer composited, which then al so removes all squashing layers. The important point is that there should be an appropriate repaint to the root GraphicsLayer: 107 CASE 2, The original composited layer is no longer composited, which then al so removes all squashing layers. The important point is that there should be an appropriate repaint to the root GraphicsLayer:
100 <pre id="Case2"></pre> 108 <pre id="Case2"></pre>
101 109
102 </div> 110 </div>
103 111
104 </body> 112 </body>
105 113
106 </html> 114 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698