Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2001 World Wide Web Consortium,
  4. (Massachusetts Institute of Technology, Institut National de
  5. Recherche en Informatique et en Automatique, Keio University). All
  6. Rights Reserved. This program is distributed under the W3C's Software
  7. Intellectual Property License. This program is distributed in the
  8. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  9. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  10. PURPOSE.
  11. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  12. --><!DOCTYPE test SYSTEM "dom1.dtd">
  13.  
  14. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="cdatasectionnormalize">
  15. <metadata>
  16. <title>cdataSectionNormalize</title>
  17. <creator>NIST</creator>
  18. <description>
  19. Adjacent CDATASection nodes cannot be merged together by
  20. use of the "normalize()" method from the Element interface.
  21. Retrieve second child of the second employee and invoke
  22. the "normalize()" method.  The Element under contains
  23. two CDATASection nodes that should not be merged together
  24. by the "normalize()" method.
  25. </description>
  26. <contributor>Mary Brady</contributor>
  27. <date qualifier="created">2001-08-17</date>
  28. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083"/>
  29. </metadata>
  30. <var name="doc" type="Document"/>
  31. <var name="nameList" type="NodeList"/>
  32. <var name="lChild" type="Element"/>
  33. <var name="childNodes" type="NodeList"/>
  34. <var name="cdataN" type="CDATASection"/>
  35. <var name="data" type="DOMString"/>
  36. <load var="doc" href="staff" willBeModified="true"/>
  37. <getElementsByTagName interface="Document" obj="doc" var="nameList" tagname="&quot;name&quot;"/>
  38. <item interface="NodeList" obj="nameList" var="lChild" index="1"/>
  39. <normalize obj="lChild"/>
  40. <childNodes obj="lChild" var="childNodes"/>
  41. <item interface="NodeList" obj="childNodes" var="cdataN" index="1"/>
  42. <assertNotNull actual="cdataN" id="firstCDATASection"/>
  43. <data interface="CharacterData" obj="cdataN" var="data"/>
  44. <assertEquals actual="data" expected='"This is a CDATASection with EntityReference number 2 &amp;ent2;"' ignoreCase="false" id="data1"/>
  45. <item interface="NodeList" obj="childNodes" var="cdataN" index="3"/>
  46. <assertNotNull actual="cdataN" id="secondCDATASection"/>
  47. <data interface="CharacterData" obj="cdataN" var="data"/>
  48. <assertEquals actual="data" expected='"This is an adjacent CDATASection with a reference to a tab &amp;tab;"' ignoreCase="false" id="data3"/>
  49. </test>
  50.