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

Side by Side Diff: LayoutTests/fast/repaint/resources/text-based-repaint.js

Issue 791453007: Deflake repaint layout tests which assumed scroll would happen before first paint. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove newline. Created 6 years 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 // Asynchronous tests should manually call finishRepaintTest at the appropriate 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate
2 // time. 2 // time.
3 window.testIsAsync = false; 3 window.testIsAsync = false;
4 window.outputRepaintRects = true; 4 window.outputRepaintRects = true;
5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b elow. 5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b elow.
6 6
7 function runRepaintTest() 7 function runRepaintTest()
8 { 8 {
9 if (!window.testRunner || !window.internals) { 9 if (!window.testRunner || !window.internals) {
10 setTimeout(repaintTest, 500); 10 setTimeout(repaintTest, 500);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 testRunner.displayAsyncThen(continueRepaintTest); 44 testRunner.displayAsyncThen(continueRepaintTest);
45 }; 45 };
46 } 46 }
47 47
48 function runRepaintAndPixelTest() 48 function runRepaintAndPixelTest()
49 { 49 {
50 window.enablePixelTesting = true; 50 window.enablePixelTesting = true;
51 runRepaintTest(); 51 runRepaintTest();
52 } 52 }
53 53
54 function runAfterDisplay(callback)
55 {
56 if (!window.testRunner) {
57 setTimeout(callback, 500);
58 } else {
59 testRunner.waitUntilDone();
60 testRunner.displayAsyncThen(callback);
61 }
62 }
63
54 function forceStyleRecalc() 64 function forceStyleRecalc()
55 { 65 {
56 if (document.body) 66 if (document.body)
57 document.body.offsetTop; 67 document.body.offsetTop;
58 else if (document.documentElement) 68 else if (document.documentElement)
59 document.documentElement.offsetTop; 69 document.documentElement.offsetTop;
60 } 70 }
61 71
62 function finishRepaintTest() 72 function finishRepaintTest()
63 { 73 {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } else { 191 } else {
182 var newRect = [xBegin, y, xWidth, 1]; 192 var newRect = [xBegin, y, xWidth, 1];
183 nextRectsMayContinue.push(newRect); 193 nextRectsMayContinue.push(newRect);
184 result.push(newRect); 194 result.push(newRect);
185 } 195 }
186 } 196 }
187 rectsMayContinue = nextRectsMayContinue; 197 rectsMayContinue = nextRectsMayContinue;
188 } 198 }
189 return result; 199 return result;
190 } 200 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/horizontal-bt-overflow-same.html ('k') | LayoutTests/fast/repaint/vertical-overflow-child.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698