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

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

Issue 1983813002: Remove workaround for multiple svg onload events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/spv2/resources/paint-invalidation-test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // All repaint tests are asynchronous. 7 // All repaint tests are asynchronous.
8 if (window.testRunner) 8 if (window.testRunner)
9 testRunner.waitUntilDone(); 9 testRunner.waitUntilDone();
10 10
11 function runRepaintTest() 11 function runRepaintTest()
12 { 12 {
13 if (!window.testRunner || !window.internals) { 13 if (!window.testRunner || !window.internals) {
14 setTimeout(repaintTest, 500); 14 setTimeout(repaintTest, 500);
15 return; 15 return;
16 } 16 }
17 17
18 // TODO(enne): this is a workaround for multiple svg onload events.
19 // See: http://crbug.com/372946
20 if (window.hasRunRepaintTest)
21 return;
22 window.hasRunRepaintTest = true;
23
24 if (window.enablePixelTesting) 18 if (window.enablePixelTesting)
25 testRunner.dumpAsTextWithPixelResults(); 19 testRunner.dumpAsTextWithPixelResults();
26 else 20 else
27 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
28 22
29 function continueRepaintTest() 23 function continueRepaintTest()
30 { 24 {
31 window.internals.startTrackingRepaints(document); 25 window.internals.startTrackingRepaints(document);
32 repaintTest(); 26 repaintTest();
33 if (!window.testIsAsync) 27 if (!window.testIsAsync)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } else { 181 } else {
188 var newRect = [xBegin, y, xWidth, 1]; 182 var newRect = [xBegin, y, xWidth, 1];
189 nextRectsMayContinue.push(newRect); 183 nextRectsMayContinue.push(newRect);
190 result.push(newRect); 184 result.push(newRect);
191 } 185 }
192 } 186 }
193 rectsMayContinue = nextRectsMayContinue; 187 rectsMayContinue = nextRectsMayContinue;
194 } 188 }
195 return result; 189 return result;
196 } 190 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/spv2/resources/paint-invalidation-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698