OLD | NEW |
---|---|
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 Loading... | |
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 | |
Xianzhu
2014/12/12 16:42:00
Nit: remove this line.
rmcilroy
2014/12/12 17:20:17
Done.
| |
63 } | |
64 | |
54 function forceStyleRecalc() | 65 function forceStyleRecalc() |
55 { | 66 { |
56 if (document.body) | 67 if (document.body) |
57 document.body.offsetTop; | 68 document.body.offsetTop; |
58 else if (document.documentElement) | 69 else if (document.documentElement) |
59 document.documentElement.offsetTop; | 70 document.documentElement.offsetTop; |
60 } | 71 } |
61 | 72 |
62 function finishRepaintTest() | 73 function finishRepaintTest() |
63 { | 74 { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 } else { | 192 } else { |
182 var newRect = [xBegin, y, xWidth, 1]; | 193 var newRect = [xBegin, y, xWidth, 1]; |
183 nextRectsMayContinue.push(newRect); | 194 nextRectsMayContinue.push(newRect); |
184 result.push(newRect); | 195 result.push(newRect); |
185 } | 196 } |
186 } | 197 } |
187 rectsMayContinue = nextRectsMayContinue; | 198 rectsMayContinue = nextRectsMayContinue; |
188 } | 199 } |
189 return result; | 200 return result; |
190 } | 201 } |
OLD | NEW |