Chromium Code Reviews| 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..b128ed540bc318c5e96384dc18add7445d29c7c5 |
| --- /dev/null |
| +++ b/LayoutTests/fast/images/image-document-remove-listener.html |
| @@ -0,0 +1,35 @@ |
| +<!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 log(message) |
|
sof
2014/09/07 04:49:41
Unused in the end, so let's just remove it.
|
| +{ |
| + var console = document.getElementById("console"); |
| + console.appendChild(document.createTextNode(message + "\n")); |
| +} |
| + |
| +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> |