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

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

Issue 211933007: [SVG] call GCController.collectAll on SVG leak tests to address Oilpan flakiness. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: == Created 6 years, 9 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 <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 id="script"> 7 <script id="script">
8 <![CDATA[ 8 <![CDATA[
9 9
10 var g = document.getElementById("g"); 10 var g = document.getElementById("g");
(...skipping 16 matching lines...) Expand all
27 anim.setAttribute("dur", "10.0s"); 27 anim.setAttribute("dur", "10.0s");
28 anim.setAttribute("repeatCount", 1); 28 anim.setAttribute("repeatCount", 1);
29 29
30 use.appendChild(anim); 30 use.appendChild(anim);
31 31
32 return use; 32 return use;
33 } 33 }
34 34
35 function cleanup() { 35 function cleanup() {
36 // Collect garbage before recording starting live node count, in case there are live elements from previous tests. 36 // Collect garbage before recording starting live node count, in case there are live elements from previous tests.
37 // FIXME: Unclear why two calls to collect() are required, see crbug.com/307 614 37 GCController.collectAll();
38 GCController.collect();
39 GCController.collect();
40 var originalLiveElements = internals.numberOfLiveNodes(); 38 var originalLiveElements = internals.numberOfLiveNodes();
41 39
42 while (g.hasChildNodes()) 40 while (g.hasChildNodes())
43 g.removeChild(g.lastChild); 41 g.removeChild(g.lastChild);
44 42
45 GCController.collect(); 43 GCController.collectAll();
46 44
47 // FIXME: Why 400 and not 200? 45 // This is 400 instead of 200 as it creates shadow tree elements.
48 var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400; 46 var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400;
49 if (liveDelta == 0) 47 if (liveDelta == 0)
50 log("PASS"); 48 log("PASS");
51 else 49 else
52 log("FAIL: " + liveDelta + " extra live node(s)"); 50 log("FAIL: " + liveDelta + " extra live node(s)");
53 51
54 testRunner.notifyDone(); 52 testRunner.notifyDone();
55 } 53 }
56 54
57 function startTest() { 55 function startTest() {
(...skipping 10 matching lines...) Expand all
68 } else { 66 } else {
69 log("This test only works when run with the testRunner, GCController, an d internals available."); 67 log("This test only works when run with the testRunner, GCController, an d internals available.");
70 return; 68 return;
71 } 69 }
72 70
73 setTimeout(startTest, 0); 71 setTimeout(startTest, 0);
74 } 72 }
75 ]]> 73 ]]>
76 </script> 74 </script>
77 </svg> 75 </svg>
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/smil-leak-element-instances.svg ('k') | LayoutTests/svg/animations/smil-leak-elements.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698