diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html new file mode 100644 index 0000000000..db03612e82 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html @@ -0,0 +1,29 @@ +<html> + <head> + <title>Inline async module script execution order</title> + <meta name=timeout content=long> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <script> + let loaded = []; + let test = async_test("Inline async module script execution order"); + window.addEventListener("load", test.step_func(function() { + assert_array_equals(loaded, + ["fast", "fast", "fast", "slow", "slow", "slow"]); + test.done(); + })); + </script> + <script type="module" async src="resources/slow-module.js?pipe=trickle(d2)&unique=1"></script> + <script type="module" async> + import "./resources/slow-module.js?pipe=trickle(d2)&unique=2"; + loaded.push("slow"); + </script> + <script type="module" async src="resources/fast-module.js?unique=1"></script> + <script type="module" async> + import "./resources/fast-module.js?unique=2"; + loaded.push("fast"); + </script> + </body> +</html> |