diff options
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html')
-rw-r--r-- | testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html new file mode 100644 index 0000000000..6ffa35515e --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html @@ -0,0 +1,30 @@ +<!doctype html> +<meta charset=utf-8> +<title>Node.appendChild: inserting three scripts from a div</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<body> + <script> +const s1 = document.createElement("script"); +const s2 = document.createElement("script"); +const s3 = document.createElement("script"); +const happened = []; + +test(() => { + s1.textContent = ` + s3.appendChild(new Text("happened.push('s3');")); + happened.push("s1"); + `; + s2.textContent = ` + happened.push("s2"); + `; + const div = document.createElement("div"); + div.appendChild(s1); + div.appendChild(s2); + div.appendChild(s3); + + assert_array_equals(happened, []); + document.body.appendChild(div); + assert_array_equals(happened, ["s3", "s1", "s2"]); +}); +</script> |