Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: third_party/WebKit/LayoutTests/fast/images/image-document-remove-listener.html

Issue 2246303003: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify test as per the comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698