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="namednodemapremovenameditemgetvalue">
  15. <metadata>
  16. <title>namednodemapRemoveNamedItemGetValue</title>
  17. <creator>NIST</creator>
  18. <description>
  19.     If the node removed by the "removeNamedItem(name)" method
  20.    is an Attr node with a default value it is immediately
  21.    replaced.
  22.    
  23.    Retrieve the third employee and create a NamedNodeMap
  24.    object of the attributes of the last child.  Once the
  25.    list is created invoke the "removeNamedItem(name)"
  26.    method with name="street".  The "removeNamedItem(name)"
  27.    method should remove the "street" attribute and since
  28.    it has a default value of "Yes", that value should
  29.    immediately be the attributes value.
  30. </description>
  31. <contributor>Mary Brady</contributor>
  32. <date qualifier="created">2001-08-17</date>
  33. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193"/>
  34. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9"/>
  35. <!--  DOM WG opinion on default attributes -->
  36. <subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html"/>
  37. </metadata>
  38. <implementationAttribute name="validating" value="true"/>
  39. <var name="doc" type="Document"/>
  40. <var name="elementList" type="NodeList"/>
  41. <var name="testEmployee" type="Node"/>
  42. <var name="attributes" type="NamedNodeMap"/>
  43. <var name="streetAttr" type="Attr"/>
  44. <var name="value" type="DOMString"/>
  45. <var name="removedNode" type="Node"/>
  46. <load var="doc" href="staff" willBeModified="true"/>
  47. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname="&quot;address&quot;"/>
  48. <item interface="NodeList" obj="elementList" var="testEmployee" index="2"/>
  49. <attributes obj="testEmployee" var="attributes"/>
  50. <assertNotNull actual="attributes" id="attributesNotNull"/>
  51. <removeNamedItem var="removedNode" obj="attributes" name="&quot;street&quot;"/>
  52. <getNamedItem obj="attributes" var="streetAttr" name="&quot;street&quot;"/>
  53. <assertNotNull actual="streetAttr" id="streetAttrNotNull"/>
  54. <value interface="Attr" obj="streetAttr" var="value"/>
  55. <assertEquals actual="value" expected="&quot;Yes&quot;" id="namednodemapRemoveNamedItemGetValueAssert" ignoreCase="false"/>
  56. </test>
  57.