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 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_textsplittextfour">
  15. <metadata>
  16. <title>hc_textSplitTextFour</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.     The "splitText(offset)" method returns the new Text node.
  20.    
  21.     Retrieve the textual data from the last child of the
  22.     first employee and invoke the "splitText(offset)" method.
  23.     The method should return the new Text node.   The offset
  24.     value used for this test is 30.   The "getNodeValue()"
  25.     method is called to check that the new node now contains
  26.     the characters at and after position 30.
  27.     (Starting count at 0)
  28. </description>
  29.  
  30. <date qualifier="created">2002-06-09</date>
  31. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D"/>
  32. </metadata>
  33. <var name="doc" type="Document"/>
  34. <var name="elementList" type="NodeList"/>
  35. <var name="addressNode" type="Node"/>
  36. <var name="textNode" type="Text"/>
  37. <var name="splitNode" type="Text"/>
  38. <var name="value" type="DOMString"/>
  39. <load var="doc" href="hc_staff" willBeModified="true"/>
  40. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname='"acronym"'/>
  41. <item interface="NodeList" obj="elementList" var="addressNode" index="0"/>
  42. <firstChild interface="Node" obj="addressNode" var="textNode"/>
  43. <splitText obj="textNode" var="splitNode" offset="30"/>
  44. <nodeValue obj="splitNode" var="value"/>
  45. <assertEquals actual="value" expected='"98551"' id="textSplitTextFourAssert" ignoreCase="false"/>
  46. </test>
  47.