| 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(timeout) |
| 8 { | 8 { |
| 9 if (!window.testRunner || !window.internals) { | 9 if (!window.testRunner || !window.internals) { |
| 10 setTimeout(repaintTest, 500); | 10 setTimeout(repaintTest, timeout || 500); |
| 11 return; | 11 return; |
| 12 } | 12 } |
| 13 | 13 |
| 14 // TODO(enne): this is a workaround for multiple svg onload events. | 14 // TODO(enne): this is a workaround for multiple svg onload events. |
| 15 // See: http://crbug.com/372946 | 15 // See: http://crbug.com/372946 |
| 16 if (window.hasRunRepaintTest) | 16 if (window.hasRunRepaintTest) |
| 17 return; | 17 return; |
| 18 window.hasRunRepaintTest = true; | 18 window.hasRunRepaintTest = true; |
| 19 | 19 |
| 20 if (window.enablePixelTesting) | 20 if (window.enablePixelTesting) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } else { | 191 } else { |
| 192 var newRect = [xBegin, y, xWidth, 1]; | 192 var newRect = [xBegin, y, xWidth, 1]; |
| 193 nextRectsMayContinue.push(newRect); | 193 nextRectsMayContinue.push(newRect); |
| 194 result.push(newRect); | 194 result.push(newRect); |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 rectsMayContinue = nextRectsMayContinue; | 197 rectsMayContinue = nextRectsMayContinue; |
| 198 } | 198 } |
| 199 return result; | 199 return result; |
| 200 } | 200 } |
| OLD | NEW |