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

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

Issue 277573003: Fix repaint rects from fast/repaint/window-resize tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TextExpectations Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 var testSizes = [ 1 var testSizes = [
2 { width: 200, height: 200 }, // initial size 2 { width: 200, height: 200 }, // initial size
3 { width: 200, height: 300 }, // height increase 3 { width: 200, height: 300 }, // height increase
4 { width: 300, height: 300 }, // width increase 4 { width: 300, height: 300 }, // width increase
5 { width: 300, height: 250 }, // height decrease 5 { width: 300, height: 250 }, // height decrease
6 { width: 250, height: 250 } // width decrease 6 { width: 250, height: 250 } // width decrease
7 // Tests can add more testSizes. 7 // Tests can add more testSizes.
8 ]; 8 ];
9 9
10 var sizeIndex = 0; 10 var sizeIndex = 0;
11 11
12 function repaintTest() { 12 function repaintTest() {
13 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height); 13 window.resizeTo(testSizes[sizeIndex].width, testSizes[sizeIndex].height);
14 } 14 }
15 15
16 if (window.internals) { 16 if (window.internals) {
17 internals.settings.setOverlayScrollbarsEnabled(true); 17 internals.settings.setOverlayScrollbarsEnabled(true);
18 internals.settings.setMockScrollbarsEnabled(true); 18 internals.settings.setMockScrollbarsEnabled(true);
19 } 19 }
20 20
21 if (window.testRunner) { 21 if (window.testRunner) {
22 testRunner.useUnfortunateSynchronousResizeMode(); 22 testRunner.useUnfortunateSynchronousResizeMode();
23 testRunner.dumpAsText();
23 24
24 window.onload = function() { 25 window.onload = function() {
25 window.resizeTo(testSizes[0].width, testSizes[0].height); 26 window.resizeTo(testSizes[0].width, testSizes[0].height);
26 27
27 for (sizeIndex = 1; sizeIndex < testSizes.length; ++sizeIndex) 28 var repaintRects = "";
28 runRepaintTest(); 29 for (sizeIndex = 1; sizeIndex < testSizes.length; ++sizeIndex) {
30 document.body.offsetTop;
31 internals.startTrackingRepaints(document);
32 repaintTest();
33 document.body.offsetTop;
34 repaintRects += window.internals.layerTreeAsText(document, window.in ternals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
ojan 2014/05/09 03:19:31 Nit: s/window.internals/internals/
enne (OOO) 2014/05/09 18:01:38 Done.
35 internals.stopTrackingRepaints(document);
36 }
37 testRunner.setCustomTextOutput(repaintRects);
29 } 38 }
30 } 39 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/repaint/window-resize-fixed-center-background-image.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698