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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/resources/text-based-repaint.js

Issue 2397333002: Change layerTreeAsText to default to layer lists. (Closed)
Patch Set: none Created 4 years, 2 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 // Asynchronous tests should manually call finishRepaintTest at the appropriate 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate
2 // time. 2 // time.
3 window.testIsAsync = false; 3 window.testIsAsync = false;
4 window.outputRepaintRects = true; 4 window.outputRepaintRects = true;
5 window.outputLayerList = false;
6 5
7 // All repaint tests are asynchronous. 6 // All repaint tests are asynchronous.
8 if (window.testRunner) 7 if (window.testRunner)
9 testRunner.waitUntilDone(); 8 testRunner.waitUntilDone();
10 9
11 if (window.internals) { 10 if (window.internals) {
12 internals.settings.setUseDefaultImageInterpolationQuality(true); 11 internals.settings.setUseDefaultImageInterpolationQuality(true);
13 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true; 12 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true;
14 } 13 }
15 14
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return; 71 return;
73 72
74 // Force a style recalc. 73 // Force a style recalc.
75 forceStyleRecalc(); 74 forceStyleRecalc();
76 75
77 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS; 76 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS;
78 77
79 if (window.layerTreeAsTextAdditionalFlags) 78 if (window.layerTreeAsTextAdditionalFlags)
80 flags |= window.layerTreeAsTextAdditionalFlags; 79 flags |= window.layerTreeAsTextAdditionalFlags;
81 80
82 if (window.outputLayerList)
83 flags |= window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST;
84
85 var layersWithInvalidationsText = window.internals.layerTreeAsText(document, flags); 81 var layersWithInvalidationsText = window.internals.layerTreeAsText(document, flags);
86 82
87 checkObjectPaintInvalidations(layersWithInvalidationsText); 83 checkObjectPaintInvalidations(layersWithInvalidationsText);
88 84
89 internals.stopTrackingRepaints(document); 85 internals.stopTrackingRepaints(document);
90 86
91 // Play nice with JS tests which may want to print out assert results. 87 // Play nice with JS tests which may want to print out assert results.
92 if (window.isJsTest) 88 if (window.isJsTest)
93 window.outputRepaintRects = false; 89 window.outputRepaintRects = false;
94 90
95 if (window.outputRepaintRects) 91 if (window.outputRepaintRects)
96 testRunner.setCustomTextOutput(layersWithInvalidationsText); 92 testRunner.setCustomTextOutput(layersWithInvalidationsText);
97 93
98 if (window.afterTest) 94 if (window.afterTest)
99 window.afterTest(); 95 window.afterTest();
100 96
101 // Play nice with async JS tests which want to notifyDone themselves. 97 // Play nice with async JS tests which want to notifyDone themselves.
102 if (!window.jsTestIsAsync) 98 if (!window.jsTestIsAsync)
103 testRunner.notifyDone(); 99 testRunner.notifyDone();
104 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698