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-2003 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_namednodemapsetnameditemwithnewvalue">
  15. <metadata>
  16. <title>hc_namednodemapSetNamedItemWithNewValue</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    If the "setNamedItem(arg)" method does not replace an
  20.   existing node with the same name then it returns null.
  21.  
  22.   Retrieve the third employee and create a NamedNodeMap
  23.   object from the attributes of the last child.
  24.   Once the list is created the "setNamedItem(arg)" method
  25.   is invoked with arg=newAttr, where newAttr is a
  26.   newly created Attr Node and whose node name
  27.   already exists in the map.  The "setNamedItem(arg)"
  28.   method should add the new node and return null.
  29.   This test uses the "createAttribute(name)" method from
  30.   the document interface.
  31. </description>
  32.  
  33. <date qualifier="created">2002-06-09</date>
  34. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788"/>
  35. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9"/>
  36. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=243"/>
  37. </metadata>
  38. <var name="doc" type="Document"/>
  39. <var name="elementList" type="NodeList"/>
  40. <var name="newAttribute" type="Attr"/>
  41. <var name="testAddress" type="Node"/>
  42. <var name="attributes" type="NamedNodeMap"/>
  43. <var name="newNode" type="Node"/>
  44. <load var="doc" href="hc_staff" willBeModified="true"/>
  45. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname='"acronym"'/>
  46. <item interface="NodeList" obj="elementList" var="testAddress" index="2"/>
  47. <createAttribute obj="doc" var="newAttribute" name='"lang"'/>
  48. <attributes obj="testAddress" var="attributes"/>
  49. <setNamedItem interface="NamedNodeMap" obj="attributes" var="newNode" arg="newAttribute"/>
  50. <assertNull actual="newNode" id="prevValueNull"/>
  51. </test>
  52.