diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html')
-rw-r--r-- | testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html new file mode 100644 index 0000000000..4d6543695c --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html @@ -0,0 +1,24 @@ +<!doctype html> +<meta charset=utf-8> +<title>Node.appendChild: inserting two text nodes in an empty script</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<body> + <script id="script"></script> +<script> +const happened = []; +test(() => { + const script = document.getElementById("script"); + const df = document.createDocumentFragment(); + df.appendChild(new Text("happened.push('t1');")); + df.appendChild(new Text("happened.push('t2');")); + assert_array_equals(happened, []); + script.appendChild(df); + assert_array_equals(happened, ["t1", "t2"]); + // At this point it's already executed so further motifications are a no-op + script.appendChild(new Text("happened.push('t3');")); + script.textContent = "happened.push('t4');" + script.text = "happened.push('t5');" + assert_array_equals(happened, ["t1", "t2"]); +}); +</script> |