Index: LayoutTests/http/tests/htmlimports/import-async-sync-grandchild.html |
diff --git a/LayoutTests/http/tests/htmlimports/import-async-sync-grandchild.html b/LayoutTests/http/tests/htmlimports/import-async-sync-grandchild.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c84a2d69aac0e92d049c5ad31909f4dce2361804 |
--- /dev/null |
+++ b/LayoutTests/http/tests/htmlimports/import-async-sync-grandchild.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script src="resources/async-block-helper.js"></script> |
+<script> |
+var test = async_test('Even with the async attribute, its subimports are loaded in order.'); |
+ |
+function childReady() { |
+ test.step(function() { |
+ assert_true(window.masterScriptExecuted, 'A script in master is executed wihtout waiting slow script.'); |
+ assert_true(isImportLoaded('has-slow-script.html'), 'A script in async import (in grandchild) has not to be excuted yet.'); |
+ assert_true(isImportLoaded('not-slow.html'), 'A script in async import (in grandchild) has not to be excuted yet.'); |
+ assert_true(isImportLoaded('has-sync-children.html'), 'A script in sync import (in child) has not to be excuted yet.'); |
+ test.done(); |
+ }); |
+} |
+ |
+</script> |
+<link id="asyncLink" async rel="import" href="resources/has-sync-children.html" onload="childReady()"> |
+<script> |
+test.step(function() { |
+ assert_false(isImportLoaded('has-slow-script.html'), 'A script in async import (in grandchild) has not to be excuted yet.'); |
+ assert_false(isImportLoaded('has-sync-children.html'), 'A script in sync import (in child) has not to be excuted yet.'); |
+ window.masterScriptExecuted = true; |
+}); |
+</script> |
+</head> |
+<body></body> |
+</html> |