2 { width: 200, height: 200 }, // initial size
3 { width: 200, height: 300 }, // height increase
4 { width: 300, height: 300 }, // width increase
5 { width: 300, height: 250 }, // height decrease
6 { width: 250, height: 250 } // width decrease
7 // Tests can add more testSizes.
12 function repaintTest() {
13 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height);
16 if (window.internals) {
17 internals.settings.setOverlayScrollbarsEnabled(true);
18 internals.settings.setMockScrollbarsEnabled(true);
21 if (window.testRunner) {
22 testRunner.useUnfortunateSynchronousResizeMode();
23 testRunner.dumpAsText();
25 window.onload = function() {
26 window.resizeTo(testSizes[0].width, testSizes[0].height);
28 var repaintRects = "";
29 for (sizeIndex = 1; sizeIndex < testSizes.length; ++sizeIndex) {
30 document.body.offsetTop;
31 internals.startTrackingRepaints(document);
33 document.body.offsetTop;
34 repaintRects += internals.layerTreeAsText(document, window.internals.LAYER_TREE_INCLUDES_REPAINT_RECTS | window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATION_OBJECTS);
35 internals.stopTrackingRepaints(document);
37 testRunner.setCustomTextOutput(repaintRects);