Index: third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html |
diff --git a/third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html b/third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html |
index ea833ef780feb9c43ee952b3d713b5c48feac58d..8b953f361bbe95d4d59b4f458772b3d87882f1d0 100644 |
--- a/third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html |
+++ b/third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html |
@@ -1,29 +1,16 @@ |
<!DOCTYPE html> |
-<html> |
-<script src="../../resources/js-test.js"></script> |
-<body> |
+<title>Test that removing invalid event listeners from image documents doesn't crash.</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<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() |
-{ |
+async_test(function(t) { |
+ if (window.testRunner) { |
+ testRunner.setCanOpenWindows(); |
+ } |
var newWindow = window.open("resources/dice.png"); |
- newWindow.onload = function() { |
+ newWindow.onload = t.step_func_done(function() { |
newWindow.addEventListener("resize", function () {;}); |
newWindow.removeEventListener("resize", 2); |
- testPassed("No crash."); |
- finishJSTest(); |
- }; |
-} |
-runTest(); |
+ }); |
+}); |
</script> |
-</body> |
-</html> |