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

Side by Side Diff: LayoutTests/fast/repaint/fixed-element-repaint-after-compositing-update.html

Issue 408843004: Convert more tests into text-based-repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 <style> 4 <style>
5 #fixedTransformed { 5 #fixedTransformed {
6 position: fixed; 6 position: fixed;
7 transform: translateZ(0) 7 transform: translateZ(0)
8 } 8 }
9 #fixedOverlapping { 9 #fixedOverlapping {
10 position: fixed; 10 position: fixed;
11 z-index: 0; 11 z-index: 0;
12 width: 100%; 12 width: 100%;
13 height: 100%; 13 height: 100%;
14 } 14 }
15 #moveMe { 15 #moveMe {
16 position: fixed; 16 position: fixed;
17 z-index: 1; 17 z-index: 1;
18 background: green; 18 background: green;
19 width: 100px; 19 width: 100px;
20 height: 100px; 20 height: 100px;
21 } 21 }
22 </style> 22 </style>
23 <script src="resources/text-based-repaint.js"></script> 23 <script src="resources/text-based-repaint.js"></script>
24 <script> 24 <script>
25 if (window.testRunner) { 25 function repaintTest() {
26 testRunner.dumpAsText();
27 testRunner.waitUntilDone();
28 }
29
30 function center(){
31 if (window.internals)
32 internals.startTrackingRepaints(document);
33
34 var mP = document.getElementById("moveMe"); 26 var mP = document.getElementById("moveMe");
35 mP.style.top = "150px"; 27 mP.style.top = "150px";
36 mP.style.left = "150px"; 28 mP.style.left = "150px";
37
38 if (!window.testRunner || !window.internals)
39 return;
40
41 var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INC LUDES_REPAINT_RECTS);
42 document.getElementById("console").textContent = layerTree;
43 window.internals.stopTrackingRepaints(document);
44 testRunner.notifyDone();
45 } 29 }
46 30
47 var frameWaitCount = 2; 31 runRepaintTest();
48 function throttle(){
49 if (frameWaitCount-- == 0) {
50 center();
51 return;
52 }
53
54 requestAnimationFrame(center);
55 }
56
57 window.addEventListener("load", throttle);
58 </script> 32 </script>
59 </head> 33 </head>
60 34
61 <body> 35 <body>
62 <p>This test checks that we correctly invalidate a shifted fixed positioned element overlapping another fixed positioned element.</p> 36 <p>This test checks that we correctly invalidate a shifted fixed positioned element overlapping another fixed positioned element.</p>
63 <p>For this test, there should be only one green square below.</p> 37 <p>For this test, there should be only one green square below.</p>
64 <div id="fixedTransformed"></div> 38 <div id="fixedTransformed"></div>
65 <div id="fixedOverlapping"></div> 39 <div id="fixedOverlapping"></div>
66 <div id="moveMe"></div> 40 <div id="moveMe"></div>
67 <pre id="console"></pre>
68 </body> 41 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698