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. <?xml-stylesheet href="test-to-html.xml" type="text/xml"?>
  3.  
  4. <!--
  5.  
  6. Copyright (c) 2001-2004 World Wide Web Consortium,
  7. (Massachusetts Institute of Technology, Institut National de
  8. Recherche en Informatique et en Automatique, Keio University).  All
  9. Rights Reserved.  This program is distributed under the W3C's Software
  10. Intellectual Property License.  This program is distributed in the
  11. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  12. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.  
  14.  
  15. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  16.  
  17. -->
  18. <!DOCTYPE test SYSTEM "dom1.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="HTMLTableElement31">
  20. <metadata>
  21. <title>HTMLTableElement31</title>
  22. <creator>NIST</creator>
  23. <description>
  24.     The insertRow() method inserts a new empty table row.  In addition, when
  25.     the table is empty the row is inserted into a TBODY which is created
  26.     and inserted into the table.
  27.    
  28.     Load the table1 file which has a non-empty table element.
  29.     Create an empty TABLE element and append to the document.
  30.     Check to make sure that the empty TABLE element doesn't
  31.     have a TBODY element.  Insert a new row into the empty
  32.     TABLE element.  Check for existence of the a TBODY element
  33.     in the table.
  34. </description>
  35. <contributor>Rick Rivello</contributor>
  36. <date qualifier="created">2002-05-02</date>
  37. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903"/>
  38. <!--  comments on the commented out sections   -->
  39. <subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2002Aug/0019.html"/>
  40. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=502"/>
  41. </metadata>
  42. <var name="nodeList" type="NodeList"/>
  43. <var name="testNode" type="Node"/>
  44. <var name="tableNode" type="Node"/>
  45. <var name="tbodiesnodeList" type="HTMLCollection"/>
  46. <var name="newRow" type="HTMLElement"/>
  47. <var name="doc" type="Document"/>
  48. <var name="table" type="Element"/>
  49. <var name="tbodiesLength" type="int"/>
  50. <load var="doc" href="table1" willBeModified="true"/>
  51. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname='"body"'/>
  52. <assertSize collection="nodeList" size="1" id="tableSize1"/>
  53. <item interface="NodeList" obj="nodeList" index="0" var="testNode"/>
  54. <createElement obj="doc" var="table" tagName='"table"'/>
  55. <appendChild obj="testNode" newChild="table" var="tableNode"/>
  56. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname='"table"'/>
  57. <assertSize collection="nodeList" size="2" id="tableSize2"/>
  58. <tBodies interface="HTMLTableElement" obj="tableNode" var="tbodiesnodeList"/>
  59. <length var="tbodiesLength" obj="tbodiesnodeList" interface="HTMLCollection"/>
  60. <assertEquals actual="tbodiesLength" expected="0" id="Asize3" ignoreCase="false"/>
  61. <insertRow interface="HTMLTableElement" obj="tableNode" var="newRow" index="0"/>
  62. <tBodies interface="HTMLTableElement" obj="tableNode" var="tbodiesnodeList"/>
  63. <length var="tbodiesLength" obj="tbodiesnodeList" interface="HTMLCollection"/>
  64. <assertEquals actual="tbodiesLength" expected="1" id="Asize4" ignoreCase="false"/>
  65. </test>
  66.