diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js')
-rw-r--r-- | testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js new file mode 100644 index 0000000000..07c55e9669 --- /dev/null +++ b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js @@ -0,0 +1,16 @@ +async_test(t => { + const div = document.body.appendChild(document.createElement("div")); + t.add_cleanup(() => div.remove()); + const t1 = div.appendChild(new Text("")); + div.appendChild(new Text("")); + const t2 = div.appendChild(new Text("")); + const t3 = div.appendChild(new Text("")); + t.step_timeout(() => { + t1.data = "X"; + t2.data = " "; + t3.data = "Y"; + assert_equals(div.innerText, "X Y", "innerText"); + assert_equals(div.outerText, "X Y", "outerText"); + t.done(); + }, 100); +}, "Ensure multiple text nodes get rendered properly"); |