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

Unified Diff: LayoutTests/fast/html/imports/resources/child-frame-with-import.html

Issue 23933004: Add tests for imports in iframe (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed bogus commas Created 7 years, 3 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 | « LayoutTests/fast/html/imports/import-in-iframe-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « LayoutTests/fast/html/imports/import-in-iframe-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698