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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/destroyed-image-load-event.html

Issue 2496663002: Merge css3/image/ and fast/images/ to images/ (Closed)
Patch Set: Address failing tests (3 of them) Created 4 years, 1 month 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
(Empty)
1 <body onload="test()">
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>
4 <div id="testRun"></div>
5 <div id="container"></div>
6 <script>
7 if (window.testRunner) {
8 testRunner.waitUntilDone();
9 testRunner.dumpAsText();
10 }
11
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");
23 var testRunDiv = document.getElementById("testRun");
24 var remainingTestRuns = 30;
25
26 function test()
27 {
28 testRunDiv.innerHTML = remainingTestRuns;
29
30 if (--remainingTestRuns < 0) {
31 testRunDiv.innerHTML = "PASS";
32 if (window.testRunner)
33 testRunner.notifyDone();
34 return;
35 }
36
37 container.innerHTML = '<img src="resources/boston.gif" onload="loaded1()">' +
38 '<img src="resources/boston.gif" onload="loaded2()">';
39 }
40
41 function loaded1()
42 {
43 var img2 = document.getElementsByTagName("img")[1];
44 img2.src = "";
45 container.removeChild(img2);
46 img2 = null;
47 gc();
48 setTimeout(test, 0);
49 }
50
51 function loaded2()
52 {
53 }
54 </script>
55 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698