Chromium Code Reviews| 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 // 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 if (window.internals) | |
|
pdr.
2016/06/08 18:40:01
Do we need to reset this at the end of the test?
Xianzhu
2016/06/08 18:41:24
Layout test runner will reset all settings after r
| |
| 12 internals.settings.setUseDefaultImageInterpolationQuality(true); | |
| 13 | |
| 11 function runRepaintTest() | 14 function runRepaintTest() |
| 12 { | 15 { |
| 13 if (!window.testRunner || !window.internals) { | 16 if (!window.testRunner || !window.internals) { |
| 14 setTimeout(repaintTest, 500); | 17 setTimeout(repaintTest, 500); |
| 15 return; | 18 return; |
| 16 } | 19 } |
| 17 | 20 |
| 18 if (window.enablePixelTesting) | 21 if (window.enablePixelTesting) |
| 19 testRunner.dumpAsTextWithPixelResults(); | 22 testRunner.dumpAsTextWithPixelResults(); |
| 20 else | 23 else |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 } else { | 184 } else { |
| 182 var newRect = [xBegin, y, xWidth, 1]; | 185 var newRect = [xBegin, y, xWidth, 1]; |
| 183 nextRectsMayContinue.push(newRect); | 186 nextRectsMayContinue.push(newRect); |
| 184 result.push(newRect); | 187 result.push(newRect); |
| 185 } | 188 } |
| 186 } | 189 } |
| 187 rectsMayContinue = nextRectsMayContinue; | 190 rectsMayContinue = nextRectsMayContinue; |
| 188 } | 191 } |
| 189 return result; | 192 return result; |
| 190 } | 193 } |
| OLD | NEW |