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

Unified Diff: LayoutTests/http/tests/htmlimports/import-dynamic-block-dynamic.html

Issue 265453003: HTML Imports: Let dynamically-added imports sync. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing. Created 6 years, 8 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/http/tests/htmlimports/import-dynamic-block-dynamic.html
diff --git a/LayoutTests/http/tests/htmlimports/import-dynamic-block-dynamic.html b/LayoutTests/http/tests/htmlimports/import-dynamic-block-dynamic.html
new file mode 100644
index 0000000000000000000000000000000000000000..86db2b8b5aef09d64c4a7b63d3367269447cd4d5
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/import-dynamic-block-dynamic.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+(function() {
+ var t = async_test('Dynamically added import blocks dynamic added imports.');
+
+ function createLink(url, onload) {
+ var link = document.createElement('link');
+ link.rel = 'import';
+ link.href = url;
+ link.onload = onload;
+ document.head.appendChild(link);
+ return link;
+ }
+
+ var dynamicLink = createLink('resources/import-slow-child.cgi');
+ var followingLink = createLink('resources/import-slow-child.cgi', function() {
+ t.step(function() {
+ assert_true(null != dynamicLink.import, 'Dynamic import');
+ assert_true(null != followingLink.import, 'Following import');
+ t.done();
+ });
+ });
+})();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698