diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/dom/nodes/ParentNode-children.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/ParentNode-children.html')
-rw-r--r-- | testing/web-platform/tests/dom/nodes/ParentNode-children.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/nodes/ParentNode-children.html b/testing/web-platform/tests/dom/nodes/ParentNode-children.html new file mode 100644 index 0000000000..6621e7d9de --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/ParentNode-children.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>ParentNode.children</title> +<link rel=help href="https://dom.spec.whatwg.org/#dom-parentnode-children"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<div style="display: none"> + <ul><li id='test'>1</li><li>2</li><li>3</li><li>4</li></ul> +</div> +<script> +test(() => { + var node = document.getElementById("test"); + var parentNode = node.parentNode; + var children = parentNode.children; + assert_true(children instanceof HTMLCollection); + var li = document.createElement("li"); + assert_equals(children.length, 4); + + parentNode.appendChild(li); + assert_equals(children.length, 5); + + parentNode.removeChild(li); + assert_equals(children.length, 4); +}, "ParentNode.children should be a live collection"); +</script> +</html> |