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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/script-tests/move-image-to-new-document.js

Issue 2255213002: Use testharness.js to test move image to new document. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected indentation. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/images/script-tests/TEMPLATE.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/images/script-tests/move-image-to-new-document.js
diff --git a/third_party/WebKit/LayoutTests/fast/images/script-tests/move-image-to-new-document.js b/third_party/WebKit/LayoutTests/fast/images/script-tests/move-image-to-new-document.js
deleted file mode 100644
index b85ec2964e442909fe6b70cb133a76afe7ee7c7f..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/images/script-tests/move-image-to-new-document.js
+++ /dev/null
@@ -1,49 +0,0 @@
-description("Test that when images are moved to a new document, a new load fires.");
-
-if (window.testRunner)
- testRunner.setPluginsEnabled(false);
-
-jsTestIsAsync = true;
-
-var subframe = document.createElement("iframe");
-document.body.appendChild(subframe);
-var subdocument = subframe.contentDocument;
-
-var types = [ "img", "input", "object", "embed" ];
-var i = 0;
-var element;
-
-function imageLoadedInSecondDocument()
-{
- element.removeEventListener("load", imageLoadedInSecondDocument, false);
- testPassed("Load event fired for " + element.tagName + " in both documents.");
- subdocument.body.removeChild(element);
- testNextType();
-}
-
-function imageLoadedInFirstDocument()
-{
- element.removeEventListener("load", imageLoadedInFirstDocument, false);
- document.body.removeChild(element);
- subdocument.body.appendChild(element);
- element.addEventListener("load", imageLoadedInSecondDocument, false);
-}
-
-function testNextType()
-{
- if (i >= types.length) {
- document.body.removeChild(subframe);
- finishJSTest();
- return;
- }
- var type = types[i++];
- element = document.createElement(type);
- if (type == "input")
- element.type = "image";
- element.data = "resources/test-load.jpg";
- element.src = "resources/test-load.jpg";
- document.body.appendChild(element);
- element.addEventListener("load", imageLoadedInFirstDocument, false);
-}
-
-testNextType();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/images/script-tests/TEMPLATE.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698