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

Side by Side Diff: LayoutTests/fast/repaint/resources/text-based-repaint.js

Issue 262963003: Output repaint rects for svg repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/as-image/set-img-height.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Asynchronous tests should manually call finishRepaintTest at the appropriate time. 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate time.
2 window.testIsAsync = false; 2 window.testIsAsync = false;
3 window.outputRepaintRects = true; 3 window.outputRepaintRects = true;
4 4
5 if (window.internals) 5 if (window.internals)
6 window.internals.settings.setForceCompositingMode(true) 6 window.internals.settings.setForceCompositingMode(true)
7 7
8 function runRepaintTest() 8 function runRepaintTest()
9 { 9 {
10 if (!window.testRunner || !window.internals) { 10 if (!window.testRunner || !window.internals) {
(...skipping 15 matching lines...) Expand all
26 26
27 repaintTest(); 27 repaintTest();
28 28
29 if (!window.testIsAsync) 29 if (!window.testIsAsync)
30 finishRepaintTest(); 30 finishRepaintTest();
31 } 31 }
32 32
33 function runRepaintAndPixelTest() 33 function runRepaintAndPixelTest()
34 { 34 {
35 window.enablePixelTesting = true; 35 window.enablePixelTesting = true;
36 window.outputRepaintRects = false;
37 runRepaintTest(); 36 runRepaintTest();
38 } 37 }
39 38
40 function forceStyleRecalc() 39 function forceStyleRecalc()
41 { 40 {
42 if (document.body) 41 if (document.body)
43 document.body.offsetTop; 42 document.body.offsetTop;
44 else if (document.documentElement) 43 else if (document.documentElement)
45 document.documentElement.offsetTop; 44 document.documentElement.offsetTop;
46 } 45 }
47 46
48 function finishRepaintTest() 47 function finishRepaintTest()
49 { 48 {
50 // Force a style recalc. 49 // Force a style recalc.
51 forceStyleRecalc(); 50 forceStyleRecalc();
52 51
53 var repaintRects = window.internals.layerTreeAsText(document, window.interna ls.LAYER_TREE_INCLUDES_REPAINT_RECTS); 52 var repaintRects = window.internals.layerTreeAsText(document, window.interna ls.LAYER_TREE_INCLUDES_REPAINT_RECTS);
54 53
55 internals.stopTrackingRepaints(document); 54 internals.stopTrackingRepaints(document);
56 55
57 if (window.outputRepaintRects) 56 if (window.outputRepaintRects)
58 testRunner.setCustomTextOutput(repaintRects); 57 testRunner.setCustomTextOutput(repaintRects);
59 58
60 if (window.afterTest) 59 if (window.afterTest)
61 window.afterTest(); 60 window.afterTest();
62 61
63 if (window.testIsAsync) 62 if (window.testIsAsync)
64 testRunner.notifyDone(); 63 testRunner.notifyDone();
65 } 64 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/as-image/set-img-height.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698