Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / repaint / resources / window-resize-repaint.js
blob859b79710d6ec4acee134e250cd2b2b454274c01
1 var testSizes = [
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.
8 ];
10 var sizeIndex = 0;
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);
32             repaintTest();
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);
36         }
37         testRunner.setCustomTextOutput(repaintRects);
38     }