Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/resources/window-resize-repaint.js

Issue 2162603002: Reland of New PaintController under-invalidation checking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: TestExpectations Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 internals.runtimeFlags.slimmingPaintUnderInvalidationCheckingEnabled = true;
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 } 15 }
21 16
22 function doTest() { 17 function doTest() {
23 if (sizeIndex) { 18 if (sizeIndex) {
24 repaintRects += internals.layerTreeAsText(document, window.internals.LAY ER_TREE_INCLUDES_PAINT_INVALIDATIONS); 19 repaintRects += internals.layerTreeAsText(document, window.internals.LAY ER_TREE_INCLUDES_PAINT_INVALIDATIONS);
25 internals.stopTrackingRepaints(document); 20 internals.stopTrackingRepaints(document);
26 } 21 }
27 ++sizeIndex; 22 ++sizeIndex;
28 if (sizeIndex < testSizes.length) { 23 if (sizeIndex < testSizes.length) {
29 internals.startTrackingRepaints(document); 24 internals.startTrackingRepaints(document);
30 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height) ; 25 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height) ;
31 testRunner.layoutAndPaintAsyncThen(doTest); 26 testRunner.layoutAndPaintAsyncThen(doTest);
32 } else if (window.testRunner) { 27 } else if (window.testRunner) {
33 testRunner.setCustomTextOutput(repaintRects); 28 testRunner.setCustomTextOutput(repaintRects);
34 testRunner.notifyDone(); 29 testRunner.notifyDone();
35 } 30 }
36 } 31 }
37 32
38 if (window.testRunner) { 33 if (window.testRunner) {
39 testRunner.useUnfortunateSynchronousResizeMode(); 34 testRunner.useUnfortunateSynchronousResizeMode();
40 testRunner.waitUntilDone(); 35 testRunner.waitUntilDone();
41 window.resizeTo(testSizes[0].width, testSizes[0].height); 36 window.resizeTo(testSizes[0].width, testSizes[0].height);
42 testRunner.layoutAndPaintAsyncThen(doTest); 37 testRunner.layoutAndPaintAsyncThen(doTest);
43 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698