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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/move-image-to-new-document.html

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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/images/move-image-to-new-document-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE html>
2 <html> 2 <title>Test that when images are moved to a new document, a new load fires.</tit le>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 </head>
6 <body> 5 <body>
7 <script src="script-tests/move-image-to-new-document.js"></script> 6 <script type="text/javascript">
8 </body> 7 if (window.testRunner)
9 </html> 8 testRunner.setPluginsEnabled(false);
9 for (var elementType of [ "img", "input", "object", "embed" ]) {
10 async_test(function(t) {
11 var subframe = document.createElement("iframe");
12 document.body.appendChild(subframe);
13 var subdocument = subframe.contentDocument;
14 var element = document.createElement(elementType);
15 if (elementType == "input")
16 element.type = "image";
17 element.data = "resources/test-load.jpg";
18 element.src = "resources/test-load.jpg";
19 document.body.appendChild(element);
20 element.onload = t.step_func(function() {
21 document.body.removeChild(element);
22 subdocument.body.appendChild(element);
23 element.onload = t.step_func_done(function() {
24 subdocument.body.removeChild(element);
25 });
26 });
27 }, document.title + ', ' + elementType);
28 }
29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/images/move-image-to-new-document-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698