diff options
Diffstat (limited to 'test/testcases/tests/level1/core/cdatasectionnormalize.xml')
-rw-r--r-- | test/testcases/tests/level1/core/cdatasectionnormalize.xml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/testcases/tests/level1/core/cdatasectionnormalize.xml b/test/testcases/tests/level1/core/cdatasectionnormalize.xml new file mode 100644 index 0000000..ce654f6 --- /dev/null +++ b/test/testcases/tests/level1/core/cdatasectionnormalize.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2001 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--><!DOCTYPE test SYSTEM "dom1.dtd"> + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="cdatasectionnormalize"> +<metadata> +<title>cdataSectionNormalize</title> +<creator>NIST</creator> +<description> +Adjacent CDATASection nodes cannot be merged together by +use of the "normalize()" method from the Element interface. +Retrieve second child of the second employee and invoke +the "normalize()" method. The Element under contains +two CDATASection nodes that should not be merged together +by the "normalize()" method. +</description> +<contributor>Mary Brady</contributor> +<date qualifier="created">2001-08-17</date> +<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083"/> +</metadata> +<var name="doc" type="Document"/> +<var name="nameList" type="NodeList"/> +<var name="lChild" type="Element"/> +<var name="childNodes" type="NodeList"/> +<var name="cdataN" type="CDATASection"/> +<var name="data" type="DOMString"/> +<load var="doc" href="staff" willBeModified="true"/> +<getElementsByTagName interface="Document" obj="doc" var="nameList" tagname=""name""/> +<item interface="NodeList" obj="nameList" var="lChild" index="1"/> +<normalize obj="lChild"/> +<childNodes obj="lChild" var="childNodes"/> +<item interface="NodeList" obj="childNodes" var="cdataN" index="1"/> +<assertNotNull actual="cdataN" id="firstCDATASection"/> +<data interface="CharacterData" obj="cdataN" var="data"/> +<assertEquals actual="data" expected='"This is a CDATASection with EntityReference number 2 &ent2;"' ignoreCase="false" id="data1"/> +<item interface="NodeList" obj="childNodes" var="cdataN" index="3"/> +<assertNotNull actual="cdataN" id="secondCDATASection"/> +<data interface="CharacterData" obj="cdataN" var="data"/> +<assertEquals actual="data" expected='"This is an adjacent CDATASection with a reference to a tab &tab;"' ignoreCase="false" id="data3"/> +</test> |