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="textsplittexttwo">
  15. <metadata>
  16. <title>textSplitTextTwo</title>
  17. <creator>NIST</creator>
  18. <description>
  19.     After the "splitText(offset)" method breaks the Text node
  20.     into two Text nodes, the original node contains all the
  21.     content up to the offset point.
  22.    
  23.     Retrieve the textual data from the second child of the
  24.     third employee and invoke the "splitText(offset)" method.
  25.     The original Text node should contain all the content
  26.     up to the offset point.   The "getNodeValue()" method
  27.     is called to check that the original node now contains
  28.     the first five characters.
  29. </description>
  30. <contributor>Mary Brady</contributor>
  31. <date qualifier="created">2001-08-17</date>
  32. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D"/>
  33. </metadata>
  34. <var name="doc" type="Document"/>
  35. <var name="elementList" type="NodeList"/>
  36. <var name="nameNode" type="Node"/>
  37. <var name="textNode" type="Text"/>
  38. <var name="splitNode" type="Text"/>
  39. <var name="value" type="DOMString"/>
  40. <load var="doc" href="staff" willBeModified="true"/>
  41. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname="&quot;name&quot;"/>
  42. <item interface="NodeList" obj="elementList" var="nameNode" index="2"/>
  43. <firstChild interface="Node" obj="nameNode" var="textNode"/>
  44. <splitText obj="textNode" var="splitNode" offset="5"/>
  45. <nodeValue obj="textNode" var="value"/>
  46. <assertEquals actual="value" expected="&quot;Roger&quot;" id="textSplitTextTwoAssert" ignoreCase="false"/>
  47. </test>
  48.