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

Unified Diff: LayoutTests/fast/html/imports/import-onload.html

Issue 22573005: [HTML Imports] Implement "load" and "error" events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 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: LayoutTests/fast/html/imports/import-onload.html
diff --git a/LayoutTests/fast/html/imports/import-onload.html b/LayoutTests/fast/html/imports/import-onload.html
new file mode 100644
index 0000000000000000000000000000000000000000..80b79108529b320db669e2cc349f82b5f48e7404
--- /dev/null
+++ b/LayoutTests/fast/html/imports/import-onload.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script>
+testRunner.waitUntilDone();
+
+var givenLoadEventTargets = [];
+function handleLoad(event)
+{
+ givenLoadEventTargets.push(event.target.id);
+ if (givenLoadEventTargets.length == 4) {
+ shouldBe("['bye', 'hello1', 'hello2', 'hello3']", "givenLoadEventTargets.sort()");
+ testRunner.notifyDone();
+ }
+}
+</script>
+<link id="hello1" rel="import" href="resources/hello.html" onload="handleLoad(event)">
+<link id="hello2" rel="import" href="resources/hello.html" onload="handleLoad(event)">
+</head>
+<body>
+<script>
+var linkToInsert = document.createElement("link");
+linkToInsert.id = "bye";
+linkToInsert.setAttribute("rel", "import");
+linkToInsert.setAttribute("href", "resources/bye.html");
+linkToInsert.onload = handleLoad;
+document.head.appendChild(linkToInsert);
+</script>
+<link id="hello3" rel="import" href="resources/hello.html" onload="handleLoad(event)">
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/html/imports/import-onerror-expected.txt ('k') | LayoutTests/fast/html/imports/import-onload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698