51
51
import com.gargoylesoftware.htmlunit.javascript.host.crypto.Crypto;
52
52
import com.gargoylesoftware.htmlunit.javascript.host.crypto.SubtleCrypto;
53
53
import com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration;
54
+ import com.gargoylesoftware.htmlunit.javascript.host.dom.CDATASection;
54
55
import com.gargoylesoftware.htmlunit.javascript.host.dom.NodeList;
55
56
import com.gargoylesoftware.htmlunit.javascript.host.dom.XPathResult;
56
57
import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection;
@@ -583,7 +584,8 @@ public void htmlElement() throws Exception {
583
584
+ "scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),setAttributeNodeNS(),"
584
585
+ "setAttributeNS(),setPointerCapture(),"
585
586
+ "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,"
587
589
+ "clientLeft,clientTop,clientWidth,closest(),constructor(),"
588
590
+ "firstElementChild,getAttribute(),getAttributeNode(),"
589
591
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
@@ -593,12 +595,14 @@ public void htmlElement() throws Exception {
593
595
+ "innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
594
596
+ "localName,"
595
597
+ "matches(),namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
596
- + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,"
598
+ + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,prepend(), "
597
599
+ "previousElementSibling,querySelector(),querySelectorAll(),remove(),removeAttribute(),"
598
- + "removeAttributeNode(),removeAttributeNS(),replaceWith(),scrollHeight,scrollIntoView(),"
600
+ + "removeAttributeNode(),removeAttributeNS(),replaceChildren(),replaceWith(),"
601
+ + "scrollHeight,scrollIntoView(),"
599
602
+ "scrollIntoViewIfNeeded(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
600
603
+ "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,"
602
606
+ "clientLeft,clientTop,clientWidth,closest(),constructor(),"
603
607
+ "firstElementChild,getAttribute(),getAttributeNode(),"
604
608
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
@@ -608,33 +612,39 @@ public void htmlElement() throws Exception {
608
612
+ "innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
609
613
+ "localName,"
610
614
+ "matches(),namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
611
- + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,"
615
+ + "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,prefix,prepend(), "
612
616
+ "previousElementSibling,querySelector(),querySelectorAll(),remove(),removeAttribute(),"
613
- + "removeAttributeNode(),removeAttributeNS(),replaceWith(),scrollHeight,scrollIntoView(),"
617
+ + "removeAttributeNode(),removeAttributeNS(),replaceChildren(),replaceWith(),"
618
+ + "scrollHeight,scrollIntoView(),"
614
619
+ "scrollIntoViewIfNeeded(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
615
620
+ "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,"
617
623
+ "clientTop,clientWidth,closest(),constructor(),"
618
624
+ "firstElementChild,getAttribute(),getAttributeNode(),"
619
625
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
620
626
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),hasAttribute(),"
621
627
+ "hasAttributeNS(),hasAttributes(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
622
628
+ "insertAdjacentText(),lastElementChild,localName,matches(),mozMatchesSelector(),namespaceURI,"
623
- + "nextElementSibling,outerHTML,prefix,previousElementSibling,querySelector(),querySelectorAll(),"
629
+ + "nextElementSibling,outerHTML,prefix,prepend(),previousElementSibling,"
630
+ + "querySelector(),querySelectorAll(),"
624
631
+ "releaseCapture(),remove(),removeAttribute(),removeAttributeNode(),"
625
- + "removeAttributeNS(),replaceWith(),"
632
+ + "removeAttributeNS(),replaceChildren(), replaceWith(),"
626
633
+ "scrollHeight,scrollIntoView(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
627
634
+ "setAttributeNS(),setCapture(),tagName,toggleAttribute(),webkitMatchesSelector()",
628
- FF_ESR = "after(),attributes,before(),childElementCount,children,"
635
+ FF_ESR = "after(),append(),attributes,before(),"
636
+ + "childElementCount,children,"
629
637
+ "classList,className,clientHeight,clientLeft,"
630
638
+ "clientTop,clientWidth,closest(),constructor(),"
631
639
+ "firstElementChild,getAttribute(),getAttributeNode(),"
632
640
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
633
641
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),hasAttribute(),"
634
642
+ "hasAttributeNS(),hasAttributes(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
635
643
+ "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(),"
638
648
+ "scrollHeight,scrollIntoView(),scrollLeft,scrollTop,scrollWidth,setAttribute(),setAttributeNode(),"
639
649
+ "setAttributeNS(),setCapture(),tagName,toggleAttribute(),webkitMatchesSelector()",
640
650
IE = "attributes,childElementCount,clientHeight,clientLeft,clientTop,clientWidth,constructor,"
@@ -13037,4 +13047,38 @@ public void cryptoSubtle() throws Exception {
13037
13047
public void xPathResult() throws Exception {
13038
13048
testString("var res = document.evaluate('/html/body', document, null, XPathResult.ANY_TYPE, null);", "res");
13039
13049
}
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
+ }
13040
13084
}
0 commit comments