5151import com.gargoylesoftware.htmlunit.javascript.host.crypto.Crypto;
5252import com.gargoylesoftware.htmlunit.javascript.host.crypto.SubtleCrypto;
5353import com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration;
54+ import com.gargoylesoftware.htmlunit.javascript.host.dom.CDATASection;
5455import com.gargoylesoftware.htmlunit.javascript.host.dom.NodeList;
5556import com.gargoylesoftware.htmlunit.javascript.host.dom.XPathResult;
5657import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection;
@@ -583,7 +584,8 @@ public void htmlElement() throws Exception {
583584 + "scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),setAttributeNodeNS(),"
584585 + "setAttributeNS(),setPointerCapture(),"
585586 + "tagName")
586- @HtmlUnitNYI(CHROME = "after(),attributes,before(),childElementCount,children,classList,className,clientHeight,"
587+ @HtmlUnitNYI(CHROME = "after(),append(),attributes,before(),"
588+ + "childElementCount,children,classList,className,clientHeight,"
587589 + "clientLeft,clientTop,clientWidth,closest(),constructor(),"
588590 + "firstElementChild,getAttribute(),getAttributeNode(),"
589591 + "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
@@ -593,12 +595,14 @@ public void htmlElement() throws Exception {
593595 + "innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
594596 + "localName,"
595597 + "matches(),namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
596- + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,"
598+ + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,prepend(), "
597599 + "previousElementSibling,querySelector(),querySelectorAll(),remove(),removeAttribute(),"
598- + "removeAttributeNode(),removeAttributeNS(),replaceWith(),scrollHeight,scrollIntoView(),"
600+ + "removeAttributeNode(),removeAttributeNS(),replaceChildren(),replaceWith(),"
601+ + "scrollHeight,scrollIntoView(),"
599602 + "scrollIntoViewIfNeeded(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
600603 + "setAttributeNS(),tagName,toggleAttribute(),webkitMatchesSelector()",
601- EDGE = "after(),attributes,before(),childElementCount,children,classList,className,clientHeight,"
604+ EDGE = "after(),append(),attributes,before(),"
605+ + "childElementCount,children,classList,className,clientHeight,"
602606 + "clientLeft,clientTop,clientWidth,closest(),constructor(),"
603607 + "firstElementChild,getAttribute(),getAttributeNode(),"
604608 + "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
@@ -608,33 +612,39 @@ public void htmlElement() throws Exception {
608612 + "innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
609613 + "localName,"
610614 + "matches(),namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
611- + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,"
615+ + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,prepend(), "
612616 + "previousElementSibling,querySelector(),querySelectorAll(),remove(),removeAttribute(),"
613- + "removeAttributeNode(),removeAttributeNS(),replaceWith(),scrollHeight,scrollIntoView(),"
617+ + "removeAttributeNode(),removeAttributeNS(),replaceChildren(),replaceWith(),"
618+ + "scrollHeight,scrollIntoView(),"
614619 + "scrollIntoViewIfNeeded(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
615620 + "setAttributeNS(),tagName,toggleAttribute(),webkitMatchesSelector()",
616- FF = "after(),attributes,before(),childElementCount,children,classList,className,clientHeight,clientLeft,"
621+ FF = "after(),append(),attributes,before(),"
622+ + "childElementCount,children,classList,className,clientHeight,clientLeft,"
617623 + "clientTop,clientWidth,closest(),constructor(),"
618624 + "firstElementChild,getAttribute(),getAttributeNode(),"
619625 + "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
620626 + "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),hasAttribute(),"
621627 + "hasAttributeNS(),hasAttributes(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
622628 + "insertAdjacentText(),lastElementChild,localName,matches(),mozMatchesSelector(),namespaceURI,"
623- + "nextElementSibling,outerHTML,prefix,previousElementSibling,querySelector(),querySelectorAll(),"
629+ + "nextElementSibling,outerHTML,prefix,prepend(),previousElementSibling,"
630+ + "querySelector(),querySelectorAll(),"
624631 + "releaseCapture(),remove(),removeAttribute(),removeAttributeNode(),"
625- + "removeAttributeNS(),replaceWith(),"
632+ + "removeAttributeNS(),replaceChildren(), replaceWith(),"
626633 + "scrollHeight,scrollIntoView(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
627634 + "setAttributeNS(),setCapture(),tagName,toggleAttribute(),webkitMatchesSelector()",
628- FF_ESR = "after(),attributes,before(),childElementCount,children,"
635+ FF_ESR = "after(),append(),attributes,before(),"
636+ + "childElementCount,children,"
629637 + "classList,className,clientHeight,clientLeft,"
630638 + "clientTop,clientWidth,closest(),constructor(),"
631639 + "firstElementChild,getAttribute(),getAttributeNode(),"
632640 + "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
633641 + "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),hasAttribute(),"
634642 + "hasAttributeNS(),hasAttributes(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
635643 + "insertAdjacentText(),lastElementChild,localName,matches(),mozMatchesSelector(),namespaceURI,"
636- + "nextElementSibling,outerHTML,prefix,previousElementSibling,querySelector(),querySelectorAll(),"
637- + "releaseCapture(),remove(),removeAttribute(),removeAttributeNode(),removeAttributeNS(),replaceWith(),"
644+ + "nextElementSibling,outerHTML,prefix,prepend(),previousElementSibling,"
645+ + "querySelector(),querySelectorAll(),"
646+ + "releaseCapture(),remove(),removeAttribute(),removeAttributeNode(),"
647+ + "removeAttributeNS(),replaceChildren(),replaceWith(),"
638648 + "scrollHeight,scrollIntoView(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
639649 + "setAttributeNS(),setCapture(),tagName,toggleAttribute(),webkitMatchesSelector()",
640650 IE = "attributes,childElementCount,clientHeight,clientLeft,clientTop,clientWidth,constructor,"
@@ -13037,4 +13047,38 @@ public void cryptoSubtle() throws Exception {
1303713047 public void xPathResult() throws Exception {
1303813048 testString("var res = document.evaluate('/html/body', document, null, XPathResult.ANY_TYPE, null);", "res");
1303913049 }
13050+
13051+ /**
13052+ * Test {@link CDATASection}.
13053+ *
13054+ * @throws Exception if the test fails
13055+ */
13056+ @Test
13057+ @Alerts(CHROME = "constructor()",
13058+ EDGE = "constructor()",
13059+ FF = "constructor()",
13060+ FF_ESR = "constructor()",
13061+ IE = "constructor")
13062+ public void cDATASection() throws Exception {
13063+ final String setup = " var doc = document.implementation.createDocument('', '', null);\n"
13064+ + "var root = doc.appendChild(doc.createElement('root'));\n"
13065+ + "var cdata = root.appendChild(doc.createCDATASection('abcdef'));\n";
13066+
13067+ testString(setup, "cdata");
13068+ }
13069+
13070+ /**
13071+ * Test {@link CDATASection}.
13072+ *
13073+ * @throws Exception if the test fails
13074+ */
13075+ @Test
13076+ @Alerts(CHROME = "after(),before(),constructor(),name,publicId,remove(),replaceWith(),systemId",
13077+ EDGE = "after(),before(),constructor(),name,publicId,remove(),replaceWith(),systemId",
13078+ FF = "after(),before(),constructor(),name,publicId,remove(),replaceWith(),systemId",
13079+ FF_ESR = "after(),before(),constructor(),name,publicId,remove(),replaceWith(),systemId",
13080+ IE = "constructor,entities,internalSubset,name,notations,publicId,systemId")
13081+ public void documentType() throws Exception {
13082+ testString("", "document.firstChild");
13083+ }
1304013084}
0 commit comments