summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html')
-rw-r--r--testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html
new file mode 100644
index 000000000..57755f4c9
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/script_012.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<title>document.write external script tokenizer order</title>
+<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
+<script>
+var t = async_test();
+var order = [];
+t.step(function() {
+ order.push(1);
+ document.write("<script>order.push(2); document.write('<script src=\"012.js\"></script' + '><meta>'); order.push(3); t.step(function() {assert_equals(document.getElementsByTagName('meta').length, 0)});</script" + "><meta>");
+ order.push(4);
+ assert_equals(document.getElementsByTagName("meta").length, 0);
+});
+</script>
+<script>
+t.step(function() {
+ order.push(6);
+ assert_equals(document.getElementsByTagName("meta").length, 2);
+ assert_array_equals(order, [1,2,3,4,5,6]);
+});
+t.done();
+</script>
+<div id="log"></div>