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_namednodemapchildnoderange">
  15. <metadata>
  16. <title>hc_namednodemapchildnoderange</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    Create a NamedNodeMap object from the attributes of the
  20.    last child of the third "p" element and traverse the
  21.    list from index 0 thru length -1.  All indices should
  22.    be valid.
  23. </description>
  24.  
  25. <date qualifier="created">2002-06-09</date>
  26. <!--attributes attribute -->
  27. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096"/>
  28. <!--item-->
  29. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9"/>
  30. <!--length attribute -->
  31. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6D0FB19E"/>
  32. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=250"/>
  33. </metadata>
  34. <var name="doc" type="Document"/>
  35. <var name="elementList" type="NodeList"/>
  36. <var name="testEmployee" type="Node"/>
  37. <var name="attributes" type="NamedNodeMap"/>
  38. <var name="child" type="Node"/>
  39. <var name="strong" type="DOMString"/>
  40. <var name="length" type="int"/>
  41. <load var="doc" href="hc_staff" willBeModified="false"/>
  42. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname='"acronym"'/>
  43. <item interface="NodeList" obj="elementList" var="testEmployee" index="2"/>
  44. <attributes obj="testEmployee" var="attributes"/>
  45. <length var="length" obj="attributes" interface="NamedNodeMap"/>
  46. <if><contentType type="text/html"/>
  47. <assertEquals actual="length" expected="2" id="htmlLength" ignoreCase="false"/>
  48. <else>
  49. <assertEquals actual="length" expected="3" id="length" ignoreCase="false"/>
  50. <item var="child" index="2" obj="attributes" interface="NamedNodeMap"/>
  51. <assertNotNull actual="child" id="attr2"/>
  52. </else>
  53. </if>
  54. <item var="child" index="0" obj="attributes" interface="NamedNodeMap"/>
  55. <assertNotNull actual="child" id="attr0"/>
  56. <item var="child" index="1" obj="attributes" interface="NamedNodeMap"/>
  57. <assertNotNull actual="child" id="attr1"/>
  58. <item var="child" index="3" obj="attributes" interface="NamedNodeMap"/>
  59. <assertNull actual="child" id="attr3"/>
  60. </test>
  61.