OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Test that removing invalid event listeners from image documents doesn't c
rash.</title> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <body> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <script> | 5 <script> |
6 description("Test that removing invalid event listeners from image documents doe
sn't crash."); | 6 async_test(function(t) { |
7 | 7 if (window.testRunner) { |
8 window.jsTestIsAsync = true; | 8 testRunner.setCanOpenWindows(); |
9 | 9 } |
10 if (window.testRunner) { | |
11 testRunner.dumpAsText(); | |
12 testRunner.setCanOpenWindows(); | |
13 testRunner.waitUntilDone(); | |
14 } | |
15 | |
16 function runTest() | |
17 { | |
18 var newWindow = window.open("resources/dice.png"); | 10 var newWindow = window.open("resources/dice.png"); |
19 newWindow.onload = function() { | 11 newWindow.onload = t.step_func_done(function() { |
20 newWindow.addEventListener("resize", function () {;}); | 12 newWindow.addEventListener("resize", function () {;}); |
21 newWindow.removeEventListener("resize", 2); | 13 newWindow.removeEventListener("resize", 2); |
22 testPassed("No crash."); | 14 }); |
23 finishJSTest(); | 15 }); |
24 }; | |
25 } | |
26 runTest(); | |
27 </script> | 16 </script> |
28 </body> | |
29 </html> | |
OLD | NEW |