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-2004 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="hc_commentgetcomment">
  15. <metadata>
  16. <title>hc_commentgetcomment</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    A comment is all the characters between the starting
  20.  '&lt;!--' and ending '--&gt;'
  21.  Retrieve the nodes of the DOM document.  Search for a
  22.  comment node and the content is its value.
  23. </description>
  24.  
  25. <date qualifier="created">2002-06-09</date>
  26. <!--  Comment interface  -->
  27. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1334481328"/>
  28. <!--Node.nodeName attribute -->
  29. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095"/>
  30. <!--Node.nodeValue attribute -->
  31. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080"/>
  32. <!--Node.nodeType attribute -->
  33. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558"/>
  34. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558"/>
  35. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=509"/>
  36. </metadata>
  37. <var name="doc" type="Document"/>
  38. <var name="elementList" type="NodeList"/>
  39. <var name="child" type="Node"/>
  40. <var name="childName" type="DOMString"/>
  41. <var name="childValue" type="DOMString"/>
  42. <var name="commentCount" type="int" value="0"/>
  43. <var name="childType" type="int"/>
  44. <var name="attributes" type="NamedNodeMap"/>
  45. <load var="doc" href="hc_staff" willBeModified="false"/>
  46. <childNodes obj="doc" var="elementList"/>
  47. <for-each collection="elementList" member="child">
  48. <nodeType obj="child" var="childType"/>
  49. <if>
  50. <equals actual="childType" expected="8" ignoreCase="false"/>
  51. <nodeName obj="child" var="childName"/>
  52. <assertEquals actual="childName" expected='"#comment"' ignoreCase="false" id="nodeName"/>
  53. <nodeValue obj="child" var="childValue"/>
  54. <assertEquals actual="childValue" expected='" This is comment number 1."' id="nodeValue" ignoreCase="false"/>
  55. <attributes var="attributes" obj="child"/>
  56. <assertNull actual="attributes" id="attributes"/>
  57. <increment var="commentCount" value="1"/>
  58. </if>
  59. </for-each>
  60. <assertTrue id="atMostOneComment"><less actual="commentCount" expected="2"/></assertTrue>
  61. </test>
  62.