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="HTMLTableSectionElement30">
  19. <metadata>
  20. <title>HTMLTableSectionElement30</title>
  21. <creator>NIST</creator>
  22. <description>
  23.    The insertRow() method inserts a new empty table row.  The new
  24.    row is inserted immediately before the current indexth row in this
  25.    section.  If index is -1 or equal to the number of rows in this section,
  26.    the new row is appended.
  27.    
  28.    Retrieve the first THEAD element and invoke the insertRow() method
  29.    with an index of negative one.  Since the index is negative one the
  30.    new row is appended.
  31.    After the new row is appended the number of rows in the THEAD
  32.    section is two.
  33. </description>
  34. <contributor>Rick Rivello</contributor>
  35. <date qualifier="created">2002-11-07</date>
  36. <subject resource="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626"/>
  37. </metadata>
  38. <var name="nodeList" type="NodeList"/>
  39. <var name="testNode" type="Node"/>
  40. <var name="newRow" type="HTMLElement"/>
  41. <var name="rowsnodeList" type="HTMLCollection"/>
  42. <var name="vrows" type="int"/>
  43. <var name="doc" type="Document"/>
  44. <load var="doc" href="tablesection" willBeModified="true"/>
  45. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname="&quot;thead&quot;"/>
  46. <assertSize collection="nodeList" size="1" id="Asize"/>
  47. <item interface="NodeList" obj="nodeList" var="testNode" index="0"/>
  48. <rows interface="HTMLTableSectionElement" obj="testNode" var="rowsnodeList"/>
  49. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  50. <assertEquals actual="vrows" expected="1" id="rowsLink1" ignoreCase="false"/>
  51. <insertRow interface="HTMLTableSectionElement" obj="testNode" var="newRow" index="-1"/>
  52. <rows interface="HTMLTableSectionElement" obj="testNode" var="rowsnodeList"/>
  53. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  54. <assertEquals actual="vrows" expected="2" id="rowsLink2" ignoreCase="false"/>
  55. </test>
  56.