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