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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/gc-freeze-with-attribute-listeners.html

Issue 2847943002: Cleanup LayoutTests that define a function gc(). (Closed)
Patch Set: Fixing Layout Tests Failures Created 3 years, 7 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 <body> 1 <body>
2 <p>Should say PASS:</p> 2 <p>Should say PASS:</p>
3 <div id=test style="display:none"></div> 3 <div id=test style="display:none"></div>
4 <script src="../../resources/gc.js"></script>
4 <script> 5 <script>
5 function gc()
6 {
7 if (window.GCController)
8 return GCController.collect();
9
10 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
11 var s = new String("");
12 }
13 }
14 6
15 function getString(i) 7 function getString(i)
16 { 8 {
17 return '<div>' + 9 return '<div>' +
18 '<a href="" onclick="return false;"> </a>' + 10 '<a href="" onclick="return false;"> </a>' +
19 '</div>'; 11 '</div>';
20 } 12 }
21 13
22 if (window.testRunner) 14 if (window.testRunner)
23 testRunner.dumpAsText(); 15 testRunner.dumpAsText();
24 16
25 var string = ""; 17 var string = "";
26 for (i = 0; i < 10000; ++i) 18 for (i = 0; i < 10000; ++i)
27 string += getString(i); 19 string += getString(i);
28 20
29 document.getElementById("test").innerHTML = string; 21 document.getElementById("test").innerHTML = string;
30 22
31 gc(); 23 gc();
32 24
33 </script> 25 </script>
34 <p>PASS</p> 26 <p>PASS</p>
35 </body> 27 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698