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

Side by Side Diff: LayoutTests/css3/flexbox/repaint-column-reverse.html

Issue 196353013: Convert some repaint tests to not call display() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations, remove do-not-repaint tricky 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 <script src="../../resources/run-after-display.js"></script>
3 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
2 <style> 4 <style>
3 #flexbox { 5 #flexbox {
4 display: -webkit-flex; 6 display: -webkit-flex;
5 -webkit-flex-flow: column-reverse; 7 -webkit-flex-flow: column-reverse;
6 width: 200px; 8 width: 200px;
7 } 9 }
8 .flex-item { 10 .flex-item {
9 height: 30px; 11 height: 30px;
10 } 12 }
11 </style> 13 </style>
12 <script> 14 <script>
15 function repaintTest()
16 {
17 document.getElementById("blue").style.margin = "1px";
18 }
19
13 function changeChildMargin() 20 function changeChildMargin()
14 { 21 {
15 document.getElementById("blue").style.margin = "1px"; 22 runRepaintTest();
16 if (window.testRunner) 23 finishRepaintTest();
17 testRunner.notifyDone();
18 } 24 }
19 25
20 window.onload = function() { 26 window.onload = function() {
21 if (window.testRunner) { 27 if (window.testRunner) {
22 testRunner.dumpAsTextWithPixelResults();
23 testRunner.waitUntilDone(); 28 testRunner.waitUntilDone();
24 testRunner.display();
25 } else { 29 } else {
26 document.body.appendChild(document.createTextNode( 30 document.body.appendChild(document.createTextNode(
27 "This test checks that for flex items that are moved multiple times during the layout " 31 "This test checks that for flex items that are moved multiple times during the layout "
28 + "only the initial and final positions are repainted. Only the blue flex item should be repainted " 32 + "only the initial and final positions are repainted. Only the blue flex item should be repainted "
29 + "after changing its position. If the other flex items are repainte d, this test fails.")); 33 + "after changing its position. If the other flex items are repainte d, this test fails."));
30 } 34 }
31 setTimeout(changeChildMargin, 0); 35 window.enablePixelTesting = true;
36 window.testIsAsync = true;
37 runAfterDisplay(changeChildMargin)
32 }; 38 };
33 </script> 39 </script>
34 <div id="flexbox"> 40 <div id="flexbox">
35 <div id="blue" class="flex-item" style="background-color: blue;"></div> 41 <div id="blue" class="flex-item" style="background-color: blue;"></div>
36 <div id="green" class="flex-item" style="background-color: green;"></div> 42 <div id="green" class="flex-item" style="background-color: green;"></div>
37 <div id="yellow" class="flex-item" style="background-color: yellow;"></div> 43 <div id="yellow" class="flex-item" style="background-color: yellow;"></div>
38 </div> 44 </div>
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/repaint.html ('k') | LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698