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_elementnormalize2">
  15. <metadata>
  16. <title>hc_elementnormalize2</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19. Add an empty text node to an existing attribute node, normalize the containing element
  20. and check that the attribute node has eliminated the empty text.
  21. </description>
  22.  
  23. <date qualifier="created">2002-06-09</date>
  24. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083"/>
  25. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=482"/>
  26. </metadata>
  27. <var name="doc" type="Document"/>
  28. <var name="root" type="Element"/>
  29. <var name="elementList" type="NodeList"/>
  30. <var name="element" type="Element"/>
  31. <var name="firstChild" type="Node"/>
  32. <var name="secondChild" type="Node"/>
  33. <var name="childValue" type="DOMString"/>
  34. <var name="emptyText" type="Text"/>
  35. <var name="attrNode" type="Attr"/>
  36. <var name="retval" type="Node"/>
  37. <load var="doc" href="hc_staff" willBeModified="true"/>
  38. <documentElement obj="doc" var="root"/>
  39. <createTextNode var="emptyText" obj="doc" data='""'/>
  40. <getElementsByTagName interface="Element" obj="root" tagname='"acronym"' var="elementList"/>
  41. <item interface="NodeList" obj="elementList" index="0" var="element"/>
  42. <getAttributeNode var="attrNode" obj="element" name='"title"'/>
  43. <appendChild var="retval" obj="attrNode" newChild="emptyText"/>
  44. <normalize obj="element"/>
  45. <getAttributeNode var="attrNode" obj="element" name='"title"'/>
  46. <firstChild interface="Node" obj="attrNode" var="firstChild"/>
  47. <nodeValue obj="firstChild" var="childValue"/>
  48. <assertEquals actual="childValue" expected='"Yes"' id="firstChild" ignoreCase="false"/>
  49. <nextSibling var="secondChild" obj="firstChild" interface="Node"/>
  50. <assertNull actual="secondChild" id="secondChildNull"/>
  51. </test>
  52.