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

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

Issue 250803011: Revert FCM text-based-repaint change and rebaselines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Too many 500 errors Created 6 years, 8 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 // 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 function runRepaintTest() 5 function runRepaintTest()
6 { 6 {
7 if (!window.testRunner || !window.internals) { 7 if (!window.testRunner || !window.internals) {
8 setTimeout(repaintTest, 100); 8 setTimeout(repaintTest, 100);
9 return; 9 return;
10 } 10 }
11 11
12 window.internals.settings.setForceCompositingMode(true);
13
14 if (window.enablePixelTesting) 12 if (window.enablePixelTesting)
15 testRunner.dumpAsTextWithPixelResults(); 13 testRunner.dumpAsTextWithPixelResults();
16 else 14 else
17 testRunner.dumpAsText(); 15 testRunner.dumpAsText();
18 16
19 if (window.testIsAsync) 17 if (window.testIsAsync)
20 testRunner.waitUntilDone(); 18 testRunner.waitUntilDone();
21 19
22 forceStyleRecalc(); 20 forceStyleRecalc();
23 21
(...skipping 18 matching lines...) Expand all
42 document.body.offsetTop; 40 document.body.offsetTop;
43 else if (document.documentElement) 41 else if (document.documentElement)
44 document.documentElement.offsetTop; 42 document.documentElement.offsetTop;
45 } 43 }
46 44
47 function finishRepaintTest() 45 function finishRepaintTest()
48 { 46 {
49 // Force a style recalc. 47 // Force a style recalc.
50 forceStyleRecalc(); 48 forceStyleRecalc();
51 49
52 var repaintRects = window.internals.layerTreeAsText(document, window.interna ls.LAYER_TREE_INCLUDES_REPAINT_RECTS); 50 var repaintRects = window.internals.repaintRectsAsText(document);
53 51
54 internals.stopTrackingRepaints(document); 52 internals.stopTrackingRepaints(document);
55 53
56 if (window.outputRepaintRects) { 54 if (window.outputRepaintRects) {
57 if (document.body) { 55 if (document.body) {
58 var root = document.body; 56 var root = document.body;
59 } else if (document.documentElement) { 57 } else if (document.documentElement) {
60 var root = document.createElementNS('http://www.w3.org/2000/svg', 'f oreignObject'); 58 var root = document.createElementNS('http://www.w3.org/2000/svg', 'f oreignObject');
61 document.documentElement.appendChild(root); 59 document.documentElement.appendChild(root);
62 } 60 }
63 var pre = document.createElementNS('http://www.w3.org/1999/xhtml', 'pre' ); 61 var pre = document.createElementNS('http://www.w3.org/1999/xhtml', 'pre' );
64 // Make this element appear in text dumps, but try to avoid affecting 62 // Make this element appear in text dumps, but try to avoid affecting
65 // output pixels (being visible, creating overflow, &c). 63 // output pixels (being visible, creating overflow, &c).
66 pre.style.opacity = 0; 64 pre.style.opacity = 0;
67 pre.textContent += repaintRects; 65 pre.textContent += repaintRects;
68 root.appendChild(pre); 66 root.appendChild(pre);
69 } 67 }
70 68
71 if (window.afterTest) 69 if (window.afterTest)
72 window.afterTest(); 70 window.afterTest();
73 71
74 if (window.testIsAsync) 72 if (window.testIsAsync)
75 testRunner.notifyDone(); 73 testRunner.notifyDone();
76 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698