OLD | NEW |
1 var testSizes = [ | 1 var testSizes = [ |
2 { width: 600, height: 500 }, // initial size | 2 { width: 600, height: 500 }, // initial size |
3 { width: 600, height: 250 }, // height decrease | 3 { width: 600, height: 250 }, // height decrease |
4 { width: 400, height: 250 }, // width decrease | 4 { width: 400, height: 250 }, // width decrease |
5 { width: 400, height: 600 }, // height increase | 5 { width: 400, height: 600 }, // height increase |
6 { width: 800, height: 600 } // width increase | 6 { width: 800, height: 600 } // width increase |
7 ]; | 7 ]; |
8 | 8 |
9 var sizeIndex = 0; | 9 var sizeIndex = 0; |
10 var repaintRects = ""; | 10 var repaintRects = ""; |
11 | 11 |
12 if (window.internals) | 12 if (window.internals) { |
13 internals.settings.setUseDefaultImageInterpolationQuality(true); | 13 internals.settings.setUseDefaultImageInterpolationQuality(true); |
| 14 // TODO(wangxianzhu): Some spv2 tests crash with under-invalidation-checking |
| 15 // because the extra display items between Subsequence/EndSubsequence for |
| 16 // under-invalidation checking breaks paint chunks. Should fix this when fix
ing |
| 17 // crbug.com/596983. |
| 18 if (!internals.runtimeFlags.slimmingPaintV2Enabled) |
| 19 internals.runtimeFlags.slimmingPaintUnderInvalidationCheckingEnabled = t
rue; |
| 20 } |
14 | 21 |
15 function doTest() { | 22 function doTest() { |
16 if (sizeIndex) { | 23 if (sizeIndex) { |
17 repaintRects += internals.layerTreeAsText(document, window.internals.LAY
ER_TREE_INCLUDES_PAINT_INVALIDATIONS); | 24 repaintRects += internals.layerTreeAsText(document, window.internals.LAY
ER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
18 internals.stopTrackingRepaints(document); | 25 internals.stopTrackingRepaints(document); |
19 } | 26 } |
20 ++sizeIndex; | 27 ++sizeIndex; |
21 if (sizeIndex < testSizes.length) { | 28 if (sizeIndex < testSizes.length) { |
22 internals.startTrackingRepaints(document); | 29 internals.startTrackingRepaints(document); |
23 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height)
; | 30 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height)
; |
24 testRunner.layoutAndPaintAsyncThen(doTest); | 31 testRunner.layoutAndPaintAsyncThen(doTest); |
25 } else if (window.testRunner) { | 32 } else if (window.testRunner) { |
26 testRunner.setCustomTextOutput(repaintRects); | 33 testRunner.setCustomTextOutput(repaintRects); |
27 testRunner.notifyDone(); | 34 testRunner.notifyDone(); |
28 } | 35 } |
29 } | 36 } |
30 | 37 |
31 if (window.testRunner) { | 38 if (window.testRunner) { |
32 testRunner.useUnfortunateSynchronousResizeMode(); | 39 testRunner.useUnfortunateSynchronousResizeMode(); |
33 testRunner.waitUntilDone(); | 40 testRunner.waitUntilDone(); |
34 window.resizeTo(testSizes[0].width, testSizes[0].height); | 41 window.resizeTo(testSizes[0].width, testSizes[0].height); |
35 testRunner.layoutAndPaintAsyncThen(doTest); | 42 testRunner.layoutAndPaintAsyncThen(doTest); |
36 } | 43 } |
OLD | NEW |