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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/hixie/perf/004.xml

Issue 2329413003: Cleanups after moving paint invalidation tests (Closed)
Patch Set: Created 4 years, 3 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 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="400" height ="400" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest ()"> 1 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="400" height ="400" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest ()">
2 <script xlink:href="../resources/text-based-repaint.js"></script> 2 <script xlink:href="../../../paint/invalidation/resources/text-based-repaint.js "></script>
3 <script type="text/javascript"> 3 <script type="text/javascript">
4 window.testIsAsync = true; 4 window.testIsAsync = true;
5 window.outputRepaintRects = false; 5 window.outputRepaintRects = false;
6 var start = new Date(); 6 var start = new Date();
7 </script> 7 </script>
8 <text x="10" y="15" font-weight="900" font-size="5">SVG Performance test.</text > 8 <text x="10" y="15" font-weight="900" font-size="5">SVG Performance test.</text >
9 <text x="10" y="95" font-weight="900" font-size="5">Test not started.</text> 9 <text x="10" y="95" font-weight="900" font-size="5">Test not started.</text>
10 <rect x="0" y="0" height="100" width="100" stroke="black" fill="none"/> 10 <rect x="0" y="0" height="100" width="100" stroke="black" fill="none"/>
11 <script type="text/javascript"><![CDATA[ 11 <script type="text/javascript"><![CDATA[
12 var svg = document.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'svg') [0]; 12 var svg = document.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'svg') [0];
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 var maxBlocks = Xs.length / maxPerBlock; 49 var maxBlocks = Xs.length / maxPerBlock;
50 var count = 0; 50 var count = 0;
51 function repaintTest() { 51 function repaintTest() {
52 for (var subcount = 0; subcount < maxPerBlock; subcount += 1) { 52 for (var subcount = 0; subcount < maxPerBlock; subcount += 1) {
53 var index = count * maxPerBlock + subcount; 53 var index = count * maxPerBlock + subcount;
54 var newI = document.createElementNS('http://www.w3.org/2000/svg', 'image') ; 54 var newI = document.createElementNS('http://www.w3.org/2000/svg', 'image') ;
55 newI.setAttribute('x', Xs[index] - (99 / Ss[index]) / 2); 55 newI.setAttribute('x', Xs[index] - (99 / Ss[index]) / 2);
56 newI.setAttribute('y', Ys[index] - (195 / Ss[index]) / 2); 56 newI.setAttribute('y', Ys[index] - (195 / Ss[index]) / 2);
57 newI.setAttribute('height', 195 / Ss[index]); 57 newI.setAttribute('height', 195 / Ss[index]);
58 newI.setAttribute('width', 99 / Ss[index]); 58 newI.setAttribute('width', 99 / Ss[index]);
59 newI.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '../../../svg/ hixie/perf/resources/smallcats.gif'); 59 newI.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'resources/sma llcats.gif');
60 newI.setAttribute('transform', 'translate(50, 50) rotate(' + Rs[index] + ' ) translate(-50, -50)'); 60 newI.setAttribute('transform', 'translate(50, 50) rotate(' + Rs[index] + ' ) translate(-50, -50)');
61 newI.appendChild(document.createTextNode(index)); // 'TEST')); 61 newI.appendChild(document.createTextNode(index)); // 'TEST'));
62 svg.insertBefore(newI, t); 62 svg.insertBefore(newI, t);
63 } 63 }
64 ++count; 64 ++count;
65 if (count < maxBlocks) { 65 if (count < maxBlocks) {
66 window.setTimeout(repaintTest, delay); 66 window.setTimeout(repaintTest, delay);
67 t.firstChild.data = 'Test in progress... ' + count + ' of ' + maxBlocks; 67 t.firstChild.data = 'Test in progress... ' + count + ' of ' + maxBlocks;
68 } else { 68 } else {
69 if (window.testRunner) 69 if (window.testRunner)
70 t.firstChild.data = 'Test completed'; 70 t.firstChild.data = 'Test completed';
71 else { 71 else {
72 var end = new Date(); 72 var end = new Date();
73 var elapsed = (end - start) / 1000; 73 var elapsed = (end - start) / 1000;
74 t.firstChild.data = 'Test completed in ' + elapsed.toFixed(2) + 's.'; 74 t.firstChild.data = 'Test completed in ' + elapsed.toFixed(2) + 's.';
75 if (parent.reportResults) parent.reportResults(end - start); 75 if (parent.reportResults) parent.reportResults(end - start);
76 } 76 }
77 finishRepaintTest(); 77 finishRepaintTest();
78 } 78 }
79 } 79 }
80 ]]></script> 80 ]]></script>
81 </svg> 81 </svg>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698