Index: LayoutTests/fast/images/image-document-remove-listener.html |
diff --git a/LayoutTests/fast/images/image-document-remove-listener.html b/LayoutTests/fast/images/image-document-remove-listener.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ea833ef780feb9c43ee952b3d713b5c48feac58d |
--- /dev/null |
+++ b/LayoutTests/fast/images/image-document-remove-listener.html |
@@ -0,0 +1,29 @@ |
+<!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> |