Index: LayoutTests/http/tests/htmlimports/import-async-previous.html |
diff --git a/LayoutTests/http/tests/htmlimports/import-async-previous.html b/LayoutTests/http/tests/htmlimports/import-async-previous.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..174652f2e6b390e2fc7970fb2c64f6340f32163d |
--- /dev/null |
+++ b/LayoutTests/http/tests/htmlimports/import-async-previous.html |
@@ -0,0 +1,29 @@ |
+<!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('With the async attribute, link element don\'t block the script execution of following imports.'); |
+ |
+function readySync() { |
+ test.step(function() { |
+ assert_false(isImportLoaded('has-slow-script.html'), 'A script in sync import has not to be excuted yet.'); |
+ assert_true(isImportLoaded('not-slow.html'), 'A script in following import is executed wihtout waiting slow script.'); |
+ }); |
+} |
+ |
+function readyAsync() { |
+ test.step(function() { |
+ assert_true(isImportLoaded('has-slow-script.html'), 'A script in sync import has not to be excuted yet.'); |
+ assert_true(isImportLoaded('not-slow.html'), 'A script in following import is executed wihtout waiting slow script.'); |
+ test.done(); |
+ }); |
+} |
+</script> |
+<link async rel="import" href="resources/has-slow-script.html" onload="readyAsync()"> |
+<link rel="import" href="resources/not-slow.html" onload="readySync()"> |
+</head> |
+<body></body> |
+</html> |