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

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

Issue 172973002: Rewrite svg/dynamic-updates to use text-based repaint harness (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: actually add file Created 6 years, 10 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 function runRepaintTest() 1 function runRepaintTest()
2 { 2 {
3 if (window.testRunner && window.internals) { 3 if (window.testRunner && window.internals) {
4 window.testRunner.dumpAsText(); 4 if (window.enablePixelTesting)
5 window.testRunner.dumpAsTextWithPixelResults();
6 else
7 window.testRunner.dumpAsText();
5 8
6 if (document.body) 9 if (document.body)
7 document.body.offsetTop; 10 document.body.offsetTop;
8 else if (document.documentElement) 11 else if (document.documentElement)
9 document.documentElement.offsetTop; 12 document.documentElement.offsetTop;
10 13
11 window.internals.startTrackingRepaints(document); 14 window.internals.startTrackingRepaints(document);
12 15
13 repaintTest(); 16 repaintTest();
14 17
15 // force a style recalc. 18 // force a style recalc.
16 var dummy = document.body.offsetTop; 19 var dummy = document.body.offsetTop;
17 20
18 var repaintRects = window.internals.repaintRectsAsText(document); 21 var repaintRects = window.internals.repaintRectsAsText(document);
19 22
20 window.internals.stopTrackingRepaints(document); 23 window.internals.stopTrackingRepaints(document);
21 24
22 var pre = document.createElement('pre'); 25 var pre = document.createElement('pre');
23 document.body.appendChild(pre); 26 document.body.appendChild(pre);
24 pre.innerHTML = repaintRects; 27 pre.textContent += repaintRects;
28
29 if (window.afterTest)
30 window.afterTest();
25 } else { 31 } else {
26 setTimeout(repaintTest, 100); 32 setTimeout(repaintTest, 100);
27 } 33 }
28 } 34 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/animations/accumulate-values-width-animation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698