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="HTMLTableElement39">
  19. <metadata>
  20. <title>HTMLTableElement39</title>
  21. <creator>NIST</creator>
  22. <description>
  23.    The insertRow() method inserts a new empty table row.
  24.    If index is -1 or equal to the number of rows, the new row
  25.    is appended.
  26.    
  27.    Retrieve the second TABLE element and invoke the insertRow() method
  28.    with an index of negative one.  
  29.    The number of rows in the TBODY section before insertion with an index
  30.    of negative one is two.  After the new row is inserted the number
  31.    of rows in the TBODY section is three.
  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-39872903"/>
  36. </metadata>
  37. <var name="nodeList" type="NodeList"/>
  38. <var name="tbodiesnodeList" type="HTMLCollection"/>
  39. <var name="testNode" type="Node"/>
  40. <var name="bodyNode" type="Node"/>
  41. <var name="newRow" type="HTMLElement"/>
  42. <var name="rowsnodeList" type="HTMLCollection"/>
  43. <var name="vsection1" type="HTMLTableSectionElement"/>
  44. <var name="vsection2" type="HTMLTableSectionElement"/>
  45. <var name="vrows" type="int"/>
  46. <var name="doc" type="Document"/>
  47. <load var="doc" href="table" willBeModified="true"/>
  48. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname="&quot;table&quot;"/>
  49. <assertSize collection="nodeList" size="3" id="Asize"/>
  50. <item interface="NodeList" obj="nodeList" var="testNode" index="1"/>
  51. <tBodies interface="HTMLTableElement" obj="testNode" var="tbodiesnodeList"/>
  52. <item interface="HTMLCollection" obj="tbodiesnodeList" var="bodyNode" index="0"/>
  53. <rows interface="HTMLTableSectionElement" obj="bodyNode" var="rowsnodeList"/>
  54. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  55. <assertEquals actual="vrows" expected="2" id="rowsLink1" ignoreCase="false"/>
  56. <insertRow interface="HTMLTableElement" obj="testNode" var="newRow" index="-1"/>
  57. <tBodies interface="HTMLTableElement" obj="testNode" var="tbodiesnodeList"/>
  58. <item interface="HTMLCollection" obj="tbodiesnodeList" var="bodyNode" index="0"/>
  59. <rows interface="HTMLTableSectionElement" obj="bodyNode" var="rowsnodeList"/>
  60. <length interface="HTMLCollection" obj="rowsnodeList" var="vrows"/>
  61. <assertEquals actual="vrows" expected="3" id="rowsLink2" ignoreCase="false"/>
  62. </test>
  63.