summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/Node-normalize.html
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-02-25 01:03:57 +0000
committerMoonchild <moonchild@palemoon.org>2021-02-25 01:03:57 +0000
commitceadffab6b357723981a429e11222daf6cd6dcfb (patch)
tree5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/dom/nodes/Node-normalize.html
parent14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff)
parentad5a13bd501e379517da1a944c104a11d951a3f5 (diff)
downloadUXP-RC_20210225.tar
UXP-RC_20210225.tar.gz
UXP-RC_20210225.tar.lz
UXP-RC_20210225.tar.xz
UXP-RC_20210225.zip
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/Node-normalize.html')
-rw-r--r--testing/web-platform/tests/dom/nodes/Node-normalize.html54
1 files changed, 0 insertions, 54 deletions
diff --git a/testing/web-platform/tests/dom/nodes/Node-normalize.html b/testing/web-platform/tests/dom/nodes/Node-normalize.html
deleted file mode 100644
index 7598852e6..000000000
--- a/testing/web-platform/tests/dom/nodes/Node-normalize.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<title>Node.normalize()</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<script>
-test(function() {
- var df = document.createDocumentFragment(),
- t1 = document.createTextNode("1"),
- t2 = document.createTextNode("2"),
- t3 = document.createTextNode("3"),
- t4 = document.createTextNode("4")
- df.appendChild(t1)
- df.appendChild(t2)
- assert_equals(df.childNodes.length, 2)
- assert_equals(df.textContent, "12")
- var el = document.createElement('x')
- df.appendChild(el)
- el.appendChild(t3)
- el.appendChild(t4)
- document.normalize()
- assert_equals(el.childNodes.length, 2)
- assert_equals(el.textContent, "34")
- assert_equals(df.childNodes.length, 3)
- assert_equals(t1.data, "1")
- df.normalize()
- assert_equals(df.childNodes.length, 2)
- assert_equals(df.firstChild, t1)
- assert_equals(t1.data, "12")
- assert_equals(t2.data, "2")
- assert_equals(el.firstChild, t3)
- assert_equals(t3.data, "34")
- assert_equals(t4.data, "4")
-})
-
-// https://www.w3.org/Bugs/Public/show_bug.cgi?id=19837
-test(function() {
- var div = document.createElement("div")
- var t1 = div.appendChild(document.createTextNode(""))
- var t2 = div.appendChild(document.createTextNode("a"))
- var t3 = div.appendChild(document.createTextNode(""))
- assert_array_equals(div.childNodes, [t1, t2, t3])
- div.normalize();
- assert_array_equals(div.childNodes, [t2])
-}, "Empty text nodes separated by a non-empty text node")
-test(function() {
- var div = document.createElement("div")
- var t1 = div.appendChild(document.createTextNode(""))
- var t2 = div.appendChild(document.createTextNode(""))
- assert_array_equals(div.childNodes, [t1, t2])
- div.normalize();
- assert_array_equals(div.childNodes, [])
-}, "Empty text nodes")
-</script>