OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 <body> |
| 5 <script> |
| 6 description("Test that removing invalid event listeners from image documents doe
sn't crash."); |
| 7 |
| 8 window.jsTestIsAsync = true; |
| 9 |
| 10 if (window.testRunner) { |
| 11 testRunner.dumpAsText(); |
| 12 testRunner.setCanOpenWindows(); |
| 13 testRunner.waitUntilDone(); |
| 14 } |
| 15 |
| 16 function log(message) |
| 17 { |
| 18 var console = document.getElementById("console"); |
| 19 console.appendChild(document.createTextNode(message + "\n")); |
| 20 } |
| 21 |
| 22 function runTest() |
| 23 { |
| 24 var newWindow = window.open("resources/dice.png"); |
| 25 newWindow.onload = function() { |
| 26 newWindow.addEventListener("resize", function () {;}); |
| 27 newWindow.removeEventListener("resize", 2); |
| 28 testPassed("No crash."); |
| 29 finishJSTest(); |
| 30 }; |
| 31 } |
| 32 runTest(); |
| 33 </script> |
| 34 </body> |
| 35 </html> |
OLD | NEW |