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. <!--
  4.  
  5. Copyright (c) 2001 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. <!DOCTYPE test SYSTEM "dom2.dtd">
  18. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="HTMLTableSectionElement31">
  19. <metadata>
  20. <title>HTMLTableSectionElement31</title>
  21. <creator>NIST</creator>
  22. <description>
  23.    The deleteRow() method deletes a row from this section.  The index
  24.    starts from 0 and is relative only to the rows contained inside
  25.    this section, not all the rows in the table.  If the index is -1
  26.    the last row will be deleted.
  27.    
  28.    Retrieve the second TBODY element and invoke the deleteRow() method
  29.    with an index of -1.  The nuber of rows in the THEAD section before
  30.    the deletion of the row is two.  After the row is deleted the number
  31.    of rows in the TBODY section is one.
  32. </description>
  33. <contributor>Rick Rivello</contributor>
  34. <date qualifier="created">2002-11-07</date>
  35. <subject resource="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626"/>
  36. </metadata>
  37. <var name="nodeList" type="NodeList"/>
  38. <var name="testNode" type="Node"/>
  39. <var name="rowsnodeList" type="HTMLCollection"/>
  40. <var name="vrows" type="int"/>
  41. <var name="doc" type="Document"/>
  42. <load var="doc" href="tablesection" willBeModified="true"/>
  43. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname="&quot;tbody&quot;"/>
  44. <assertSize collection="nodeList" size="2" id="Asize"/>
  45. <item interface="NodeList" obj="nodeList" var="testNode" index="1"/>
  46. <rows interface="HTMLTableSectionElement" obj="testNode" var="rowsnodeList"/>
  47. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  48. <assertEquals actual="vrows" expected="2" id="rowsLink1" ignoreCase="false"/>
  49. <deleteRow interface="HTMLTableSectionElement" obj="testNode" index="-1"/>
  50. <rows interface="HTMLTableSectionElement" obj="testNode" var="rowsnodeList"/>
  51. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  52. <assertEquals actual="vrows" expected="1" id="rowsLink2" ignoreCase="false"/>
  53. </test>
  54.