| 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 } |
| 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 Loading... |
| 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 } |
| OLD | NEW |