summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html')
-rw-r--r--testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html
new file mode 100644
index 0000000000..a8994c6aeb
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html><head>
+ <title>scheduler: altering the type attribute and adding/removing external script </title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="testlib/testlib.js"></script>
+</head>
+<div id="log"></div>
+<script>
+ var t = async_test();
+</script>
+<script id="test" type="text/plain" src="scripts/include-1.js?pipe=trickle(d1)"></script>
+<script>
+t.step(function() {
+ var script = document.getElementById("test");
+ script.removeAttribute("type");
+ var marker = document.createElement("script");
+ marker.src = "scripts/include-2.js?pipe=trickle(d2)";
+ marker.async = false;
+ script.parentNode.appendChild(marker);
+ script.parentNode.appendChild(script);
+ test(function() {assert_true(script.async)}, "Reinserted script async IDL attribute");
+});
+onload = t.step_func(function () {
+ assert_array_equals(eventOrder, ["external script #1", "external script #2"]);
+ t.done();
+});
+</script>