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> |