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

Side by Side Diff: LayoutTests/svg/animations/smil-leak-element-instances.svg

Issue 644093003: NOP refactor to make various layout tests use setTimeout 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 <svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/ 1999/xlink" onload="load()"> 1 <svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/ 1999/xlink" onload="load()">
2 <defs> 2 <defs>
3 <rect id="rect" width="100" height="100" /> 3 <rect id="rect" width="100" height="100" />
4 </defs> 4 </defs>
5 <g id="g"/> 5 <g id="g"/>
6 <text x="50" y="50" id="log"/> 6 <text x="50" y="50" id="log"/>
7 <script xlink:href="../../resources/js-test.js"></script> 7 <script xlink:href="../../resources/js-test.js"></script>
8 <script id="script"> 8 <script id="script">
9 <![CDATA[ 9 <![CDATA[
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 }); 54 });
55 } 55 }
56 56
57 function startTest() { 57 function startTest() {
58 // Hold a reference to rect.x.baseVal on the root instance. 58 // Hold a reference to rect.x.baseVal on the root instance.
59 xBaseVal = document.getElementById("rect").x.baseVal; 59 xBaseVal = document.getElementById("rect").x.baseVal;
60 60
61 for (var i = 0; i < 100; i++) 61 for (var i = 0; i < 100; i++)
62 g.appendChild(createAnimatedRectInstance()); 62 g.appendChild(createAnimatedRectInstance());
63 63
64 setTimeout(cleanup, 0); 64 // FIXME: we need a better way of waiting for chromium events to happen
65 setTimeout(cleanup, 1);
65 } 66 }
66 67
67 function load() { 68 function load() {
68 if (window.testRunner && window.GCController && window.internals) { 69 if (window.testRunner && window.GCController && window.internals) {
69 testRunner.dumpAsText(); 70 testRunner.dumpAsText();
70 testRunner.waitUntilDone(); 71 testRunner.waitUntilDone();
71 } else { 72 } else {
72 log("This test only works when run with the testRunner, GCController, an d internals available."); 73 log("This test only works when run with the testRunner, GCController, an d internals available.");
73 return; 74 return;
74 } 75 }
75 76
76 setTimeout(startTest, 0); 77 // FIXME: we need a better way of waiting for chromium events to happen
78 setTimeout(startTest, 1);
77 } 79 }
78 ]]> 80 ]]>
79 </script> 81 </script>
80 </svg> 82 </svg>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698