Index: LayoutTests/fast/html/imports/resources/child-frame-with-import.html |
diff --git a/LayoutTests/fast/html/imports/resources/child-frame-with-import.html b/LayoutTests/fast/html/imports/resources/child-frame-with-import.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..af3b57e7d84981a11759c0d9b2ab89ac1bb41803 |
--- /dev/null |
+++ b/LayoutTests/fast/html/imports/resources/child-frame-with-import.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+var callbackCount = 0; |
+ |
+function finishJSTestIfNeeded() |
+{ |
+ callbackCount++; |
+ if (2 == callbackCount) |
+ window.parent.finishJSTest(); |
+} |
+ |
+function importLoaded() |
+{ |
+ window.parent.headlineText = target.import.querySelector('h1').innerHTML; |
+ window.parent.shouldBe('headlineText', '"Hello"'); |
+ finishJSTestIfNeeded(); |
+} |
+ |
+function importError() |
+{ |
+ window.parent.wrongImport = wrong.import; |
+ window.parent.shouldBeNull('wrongImport'); |
+ finishJSTestIfNeeded(); |
+} |
+</script> |
+<link id="target" rel="import" href="hello.html" onload="importLoaded()"> |
+<link id="wrong" rel="import" href="nosuch.html" onerror="importError()"> |
+</head> |
+<body> |
+</body> |
+</html> |