| <!DOCTYPE html> |
| <html> |
| <script src="../../resources/js-test.js"></script> |
| <body> |
| <script> |
| description("Test that removing invalid event listeners from image documents doesn't crash."); |
| |
| window.jsTestIsAsync = true; |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function runTest() |
| { |
| var newWindow = window.open("resources/dice.png"); |
| newWindow.onload = function() { |
| newWindow.addEventListener("resize", function () {;}); |
| newWindow.removeEventListener("resize", 2); |
| testPassed("No crash."); |
| finishJSTest(); |
| }; |
| } |
| runTest(); |
| </script> |
| </body> |
| </html> |