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_elementretrieveallattributes">
  15. <metadata>
  16. <title>hc_elementretrieveallattributes</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    Create a list of all the attributes of the last child
  20.    of the first "p" element by using the "getAttributes()"
  21.    method.
  22. </description>
  23.  
  24. <date qualifier="created">2002-06-09</date>
  25. <!--attributes attribute -->
  26. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096"/>
  27. <!--  DOM WG opinion on default attributes -->
  28. <subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html"/>
  29. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=184"/>
  30. </metadata>
  31. <var name="doc" type="Document"/>
  32. <var name="addressList" type="NodeList"/>
  33. <var name="testAddress" type="Node"/>
  34. <var name="attributes" type="NamedNodeMap"/>
  35. <var name="attribute" type="Attr"/>
  36. <var name="attributeName" type="DOMString"/>
  37. <var name="actual" type="Collection"/>
  38. <var name="htmlExpected" type="Collection">
  39.     <member>"title"</member>
  40. </var>
  41. <var name="expected" type="Collection">
  42.     <member>"title"</member>
  43.     <member>"dir"</member>
  44. </var>
  45. <load var="doc" href="hc_staff" willBeModified="false"/>
  46. <getElementsByTagName interface="Document" obj="doc" tagname='"acronym"' var="addressList"/>
  47. <item interface="NodeList" obj="addressList" index="0" var="testAddress"/>
  48. <attributes obj="testAddress" var="attributes"/>
  49. <for-each collection="attributes" member="attribute">
  50.     <nodeName var="attributeName" obj="attribute"/>
  51.     <append collection="actual" item="attributeName"/>
  52. </for-each>
  53. <if><contentType type="text/html"/>
  54.     <assertEquals id="htmlAttributeNames" actual="actual" expected="htmlExpected" ignoreCase="true"/>
  55.     <else>
  56.         <assertEquals id="attributeNames" actual="actual" expected="expected" ignoreCase="true"/>
  57.     </else>
  58. </if>
  59. </test>
  60.