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"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
  2.  
  3. <!--
  4.  
  5. Copyright (c) 2001-2004 World Wide Web Consortium,
  6. (Massachusetts Institute of Technology, Institut National de
  7. Recherche en Informatique et en Automatique, Keio University).  All
  8. Rights Reserved.  This program is distributed under the W3C's Software
  9. Intellectual Property License.  This program is distributed in the
  10. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE.  
  13.  
  14. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  15.  
  16. -->
  17.  
  18. <!DOCTYPE test SYSTEM "dom3.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore09">
  20. <metadata>
  21. <title>nodeinsertbefore09</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The method insertBefore inserts the node newChild before the existing child node refChild.
  25.         If refChild is null, insert newChild at the end of the list of children.
  26.         If newChild is a DocumentFragment object, all of its children are inserted, in the same
  27.         order, before refChild.
  28.  
  29.         Using insertBefore on this Document node attempt to insert a new DocumentFragment node
  30.         before a Comment node and verify the contents of the Comment node that is a child
  31.         of the DocumentFragment.
  32. </description>
  33. <contributor>Neil Delima</contributor>
  34. <date qualifier="created">2002-06-10</date>
  35. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/>
  36. </metadata>
  37. <implementationAttribute name="namespaceAware" value="true"/>
  38. <var name="doc" type="Document"/>
  39. <var name="docFrag" type="DocumentFragment"/>
  40. <var name="newComment" type="Comment"/>
  41. <var name="insertComment" type="Comment"/>
  42. <var name="comment" type="Comment"/>
  43. <var name="inserted" type="DocumentFragment"/>
  44. <var name="data" type="DOMString"/>
  45. <var name="appendedChild" type="Node"/>
  46. <load var="doc" href="hc_staff" willBeModified="false"/>
  47. <createComment var="newComment" obj="doc" data='"Comment"' />
  48. <appendChild obj="doc" var="appendedChild" newChild="newComment"/>
  49. <createDocumentFragment var="docFrag" obj="doc"/>
  50. <createComment var="insertComment" obj="doc" data='"insertComment"' />
  51. <appendChild obj="docFrag" var="appendedChild" newChild="insertComment"/>
  52. <insertBefore var="inserted" obj="doc" newChild="docFrag" refChild="newComment"/>
  53. <previousSibling var="comment" obj="newComment" interface="Node"/>
  54. <data var="data" obj="comment" interface="CharacterData"/>
  55. <assertEquals actual="data" expected='"insertComment"' id="nodeinsertbefore09" ignoreCase="false"/>
  56. </test>
  57.