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="HTMLTableRowElement20">
  19. <metadata>
  20. <title>HTMLTableRowElement20</title>
  21. <creator>NIST</creator>
  22. <description>
  23.    The insertCell() method inserts an empty TD cell into this row.
  24.    If index is -1 or equal to the number of cells, the new cell is
  25.    appended.
  26.  
  27.    
  28.    Retrieve the fourth TR element and examine the value of
  29.    the cells length attribute which should be set to six.  
  30.    Check the value of the last TD element.  Invoke the
  31.    insertCell() with an index of negative one
  32.    which will append the empty cell to the end of the list.
  33.    Check the value of the newly created cell and make sure it is null
  34.    and also the numbers of cells should now be seven.
  35. </description>
  36. <contributor>Rick Rivello</contributor>
  37. <date qualifier="created">2002-11-07</date>
  38. <subject resource="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016"/>
  39. </metadata>
  40. <var name="nodeList" type="NodeList"/>
  41. <var name="cellsnodeList" type="HTMLCollection"/>
  42. <var name="testNode" type="Node"/>
  43. <var name="trNode" type="Node"/>
  44. <var name="cellNode" type="Node"/>
  45. <var name="value" type="DOMString"/>
  46. <var name="newCell" type="HTMLElement"/>
  47. <var name="vcells" type="int"/>
  48. <var name="doc" type="Document"/>
  49. <load var="doc" href="tablerow" willBeModified="true"/>
  50. <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname="&quot;tr&quot;"/>
  51. <assertSize collection="nodeList" size="5" id="Asize"/>
  52. <item interface="NodeList" obj="nodeList" var="testNode" index="3"/>
  53. <cells interface="HTMLTableRowElement" obj="testNode" var="cellsnodeList"/>
  54. <length interface="HTMLCollection" obj="cellsnodeList" var="vcells"/>
  55. <assertEquals actual="vcells" expected="6" id="cellsLink1" ignoreCase="false"/>
  56. <item interface="HTMLCollection" obj="cellsnodeList" var="trNode" index="5"/>
  57. <firstChild interface="Node" obj="trNode" var="cellNode"/>
  58. <nodeValue obj="cellNode" var="value"/>
  59. <assertEquals actual="value" expected="&quot;1230 North Ave. Dallas, Texas 98551&quot;" id="value1Link" ignoreCase="false"/>
  60. <insertCell interface="HTMLTableRowElement" obj="testNode" var="newCell" index="-1"/>
  61. <item interface="NodeList" obj="nodeList" var="testNode" index="3"/>
  62. <cells interface="HTMLTableRowElement" obj="testNode" var="cellsnodeList"/>
  63. <length interface="HTMLCollection" obj="cellsnodeList" var="vcells"/>
  64. <assertEquals actual="vcells" expected="7" id="cellsLink2" ignoreCase="false"/>
  65. <item interface="HTMLCollection" obj="cellsnodeList" var="trNode" index="6"/>
  66. <firstChild interface="Node" obj="trNode" var="cellNode"/>
  67. <assertNull actual="cellNode" id="value2Link"/>
  68. </test>
  69.