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

Side by Side Diff: third_party/WebKit/LayoutTests/images/destroyed-image-load-event.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 onload="test()"> 1 <body onload="test()">
2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34490">bug 34490<a/ >: 2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34490">bug 34490<a/ >:
3 WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions .</p> 3 WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions .</p>
4 <div id="testRun"></div> 4 <div id="testRun"></div>
5 <div id="container"></div> 5 <div id="container"></div>
6 <script src="../resources/gc.js"></script>
6 <script> 7 <script>
7 if (window.testRunner) { 8 if (window.testRunner) {
8 testRunner.waitUntilDone(); 9 testRunner.waitUntilDone();
9 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
10 } 11 }
11 12
12 function gc()
13 {
14 if (window.GCController)
15 return GCController.collect();
16
17 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
18 var s = new String("abc");
19 }
20 }
21
22 var container = document.getElementById("container"); 13 var container = document.getElementById("container");
23 var testRunDiv = document.getElementById("testRun"); 14 var testRunDiv = document.getElementById("testRun");
24 var remainingTestRuns = 30; 15 var remainingTestRuns = 30;
25 16
26 function test() 17 function test()
27 { 18 {
28 testRunDiv.innerHTML = remainingTestRuns; 19 testRunDiv.innerHTML = remainingTestRuns;
29 20
30 if (--remainingTestRuns < 0) { 21 if (--remainingTestRuns < 0) {
31 testRunDiv.innerHTML = "PASS"; 22 testRunDiv.innerHTML = "PASS";
(...skipping 14 matching lines...) Expand all
46 img2 = null; 37 img2 = null;
47 gc(); 38 gc();
48 setTimeout(test, 0); 39 setTimeout(test, 0);
49 } 40 }
50 41
51 function loaded2() 42 function loaded2()
52 { 43 {
53 } 44 }
54 </script> 45 </script>
55 </body> 46 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698