//**************************************************************************
//
//
// National Institute Of Standards and Technology
// DTS Version 1.0
//
// HTMLTableElement Interface
//**************************************************************************
function HTMLTableElement()
{
var tests = new Array (HTML0001HTE(),HTML0002HTE(),HTML0003HTE(),HTML0004HTE(),HTML0005HTE(),HTML0006HTE(),HTML0007HTE(),HTML0008HTE(),HTML0009HTE(),HTML0010HTE(),HTML0011HTE(),HTML0012HTE(),HTML0013HTE(),HTML0014HTE(),HTML0015HTE(),HTML0016HTE(),HTML0017HTE(),HTML0018HTE(),HTML0019HTE(),HTML0020HTE(),HTML0021HTE(),HTML0022HTE(),HTML0023HTE(),HTML0024HTE(),HTML0025HTE(),HTML0026HTE(),HTML0027HTE(),HTML0028HTE(),HTML0029HTE(),HTML0030HTE(),HTML0031HTE(),HTML0032HTE(),HTML0033HTE());
return tests;
}
//------------------------ test case HTML-0001HTE ------------------------
//
// Testing feature - The "caption" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the CAPTION attribute of the first TABLE
// element of the testing document by accessing
// the "caption" attribute of the table element. This
// attribute should contain an HTMLTableCaptionElement
// whose "align" attribute is equal to "TOP".
//
// Semantic Requirements: 1
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0001HTE()
{
var computedValue = "";
var expectedValue = "TOP";
var results = "";
var testNode = "";
var tableCaption = "";
results = new testResults("HTML0001HTE");
results.description = "The \"caption\" attribute of the "+
"HTMLTableElement interface";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "caption" attribute.
//
tableCaption = testNode.node.caption;
computedValue = tableCaption.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0001HTE -------------------------
//
//-------------------------- test case HTML-0002HTE ---------------------------
//
// Testing feature - The "caption" attribute of the HTMLTableElement
// interface contains null if there is no table
// caption.
//
// Testing approach - Retrieve the CAPTION attribute of the second TABLE
// element of the testing document by accessing
// the "caption" attribute of the table element. This
// attribute should contain a null value;
//
// Semantic Requirements: 2
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0002HTE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0002HTE");
results.description = "The \"caption\" attribute of the "+
"HTMLTableElement interface returns null if "+
"there is no table caption.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and examine its "caption" attribute.
//
computedValue = testNode.node.caption;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0002HTE -------------------------
//
//-------------------------- test case HTML-0003HTE ---------------------------
//
// Testing feature - The "tHead" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the THEAD attribute of the first TABLE
// element of the testing document by accessing
// the "tHead" attribute of the table element. This
// attribute should contain an HTMLTableSectionElement
// whose "align" attribute is equal to "CENTER".
//
// Semantic Requirements: 3
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0003HTE()
{
var computedValue = "";
var expectedValue = "CENTER";
var results = "";
var testNode = "";
var tableHead = "";
results = new testResults("HTML0003HTE");
results.description = "The \"tHead\" attribute of the "+
"HTMLTableElement interface";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "tHead" (via getTableHead method) attribute.
//
tableHead = getTableHead(testNode.node);
computedValue = tableHead.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0003TE --------------------------
//
//-------------------------- test case HTML-0004HTE ---------------------------
//
// Testing feature - The "tHead" attribute of the HTMLTableElement
// interface contains null if there is no table
// THEAD element.
//
// Testing approach - Retrieve the THEAD attribute of the second TABLE
// element of the testing document by accessing
// the "tHead" attribute of the table element. This
// attribute should contain a null value;
//
// Semantic Requirements: 4
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0004HTE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0004HTE");
results.description = "The \"THead\" attribute of the "+
"HTMLTableElement interface returns null if "+
"there is no table's THEAD.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and examine its "tHead" (via the getTableHead method) attribute.
//
computedValue = getTableHead(testNode.node);
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0004HTE -------------------------
//
//-------------------------- test case HTML-0005HTE ---------------------------
//
// Testing feature - The "tFoot" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the TFOOT attribute of the first TABLE
// element of the testing document by accessing
// the "tFoot" attribute of the table element. This
// attribute should contain an HTMLTableSectionElement
// whose "align" attribute is equal to "CENTER".
//
// Semantic Requirements: 5
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0005HTE()
{
var computedValue = "";
var expectedValue = "CENTER";
var results = "";
var testNode = "";
var tableFoot = "";
results = new testResults("HTML0005HTE");
results.description = "The \"tFoot\" attribute of the "+
"HTMLTableElement interface";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "tFoot" (via getTableFoot method) attribute.
//
tableFoot = getTableFoot(testNode.node);
computedValue = tableFoot.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0005TE --------------------------
//
//-------------------------- test case HTML-0006HTE ---------------------------
//
// Testing feature - The "tFoot" attribute of the HTMLTableElement
// interface contains null if there is no table
// TFOOT element.
//
// Testing approach - Retrieve the TFOOT attribute of the second TABLE
// element of the testing document by accessing
// the "tFoot" attribute of the table element. This
// attribute should contain a null value;
//
// Semantic Requirements: 6
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0006HTE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0006HTE");
results.description = "The \"TFoot\" attribute of the "+
"HTMLTableElement interface returns null if "+
"there is no table TFOOT element.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and examine its "tFoot" (via the getTableFoot method) attribute.
//
computedValue = getTableFoot(testNode.node);
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0006HTE -------------------------
//
//-------------------------- test case HTML-0007HTE ---------------------------
//
// Testing feature - The "rows" attribute of the HTMLTableElement
// interface returns a collection of all the rows
// in the table (including the THEAD, TFOOT and
// TBODY elements)
//
// Testing approach - Create an HTMLCollection object by accessing
// the "rows" attribute of the first TABLE element
// of the testing document. The length of the
// HTMLCollection should be equal to 7 (including
// the THEAD, TFOOT and TBODY elements).
//
// Semantic Requirements: 7
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0007HTE()
{
var computedValue = "";
var expectedValue = 7;
var results = "";
var testNode = "";
var tableRows = "";
results = new testResults("HTML0007HTE");
results.description = "The \"rows\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "rows" attribute.
//
tableRows = testNode.node.rows;
computedValue = tableRows.length;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0007HTE -------------------------
//
//-------------------------- test case HTML-0008HTE ---------------------------
//
// Testing feature - The "tBodies" attribute of the HTMLTableElement
// interface returns a collection of all the defined
// table bodies (single table BODY element).
//
// Testing approach - Create an HTMLCollection object by accessing
// the "tBodies" attribute of the first TABLE element
// of the testing document. The length of the
// HTMLCollection should be equal to 1.
//
// Semantic Requirements: 8
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0008HTE()
{
var computedValue = "";
var expectedValue = 1;
var results = "";
var testNode = "";
var tableRows = "";
results = new testResults("HTML0008HTE");
results.description = "The \"tBodies\" attribute of the "+
"HTMLTableElement interface (single "+
"table body).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "tBodies" attribute.
//
tableBodies = testNode.node.tBodies;
computedValue = tableBodies.length;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0008HTE -------------------------
//
//-------------------------- test case HTML-0009HTE ---------------------------
//
// Testing feature - The "tBodies" attribute of the HTMLTableElement
// interface returns a collection of all the defined
// table bodies (multiple table BODY elements).
//
// Testing approach - Create an HTMLCollection object by accessing
// the "tBodies" attribute of the first TABLE element
// of the testing document. The length of the
// HTMLCollection should be equal to 3.
//
// Semantic Requirements: 8
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0009HTE()
{
var computedValue = "";
var expectedValue = 3;
var results = "";
var testNode = "";
var tableRows = "";
results = new testResults("HTML0009HTE");
results.description = "The \"tBodies\" attribute of the "+
"HTMLTableElement interface (multiple "+
"table bodies).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and examine its "tBodies" attribute.
//
tableBodies = testNode.node.tBodies;
computedValue = tableBodies.length;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0009HTE -------------------------
//
//-------------------------- test case HTML-0010HTE ---------------------------
//
// Testing feature - The "align" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "align" attribute. It
// should be set to "CENTER".
//
// Semantic Requirements: 9
//
// Last modification date - July 26, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0010HTE()
{
var computedValue = "";
var expectedValue = "CENTER";
var results = "";
var testNode = "";
results = new testResults("HTML0010HTE");
results.description = "The \"align\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "align" attribute.
//
computedValue = testNode.node.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0010HTE -------------------------
//
//-------------------------- test case HTML-0011HTE ---------------------------
//
// Testing feature - The "bgColor" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "bgColor" attribute. It
// should be set to "#FF0000".
//
// Semantic Requirements: 10
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0011HTE()
{
var computedValue = "";
var expectedValue = "#FF0000";
var results = "";
var testNode = "";
results = new testResults("HTML0011HTE");
results.description = "The \"bgColor\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "bgColor" attribute.
//
computedValue = testNode.node.bgColor;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0011HTE -------------------------
//
//-------------------------- test case HTML-0012HTE ---------------------------
//
// Testing feature - The "border" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "border" attribute. It
// should be set to "4".
//
// Semantic Requirements: 11
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0012HTE()
{
var computedValue = "";
var expectedValue = "4";
var results = "";
var testNode = "";
results = new testResults("HTML0012HTE");
results.description = "The \"border\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "border" attribute.
//
computedValue = testNode.node.border;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-00112HTE -------------------------
//
//-------------------------- test case HTML-0013HTE ----------------------------
//
// Testing feature - The "cellPadding" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "cellPadding" attribute.
// It should be set to "4".
//
// Semantic Requirements: 12
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0013HTE()
{
var computedValue = "";
var expectedValue = "2";
var results = "";
var testNode = "";
results = new testResults("HTML0013HTE");
results.description = "The \"cellPadding\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "cellPadding" attribute.
//
computedValue = testNode.node.cellPadding;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0013HTE -------------------------
//
//-------------------------- test case HTML-0014HTE ---------------------------
//
// Testing feature - The "cellSpacing" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "cellSpacing" attribute.
// It should be set to "4".
//
// Semantic Requirements: 13
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0014HTE()
{
var computedValue = "";
var expectedValue = "2";
var results = "";
var testNode = "";
results = new testResults("HTML0014HTE");
results.description = "The \"cellSpacing\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "cellSpacing" attribute.
//
computedValue = testNode.node.cellSpacing;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0014HTE -------------------------
//
//-------------------------- test case HTML-0015HTE ---------------------------
//
// Testing feature - The "frame" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "frame" attribute. It
// It should be set to "BORDER".
//
// Semantic Requirements: 14
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0015HTE()
{
var computedValue = "";
var expectedValue = "BORDER";
var results = "";
var testNode = "";
results = new testResults("HTML0015HTE");
results.description = "The \"frame\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "frame" attribute.
//
computedValue = testNode.node.frame;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0015HTE -------------------------
//
//-------------------------- test case HTML-0016HTE ---------------------------
//
// Testing feature - The "rules" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "rules" attribute. It
// It should be set to "ALL".
//
// Semantic Requirements: 15
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0016HTE()
{
var computedValue = "";
var expectedValue = "ALL";
var results = "";
var testNode = "";
results = new testResults("HTML0016HTE");
results.description = "The \"rules\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "rules" attribute.
//
computedValue = testNode.node.rules;
computedValue = computedValue.toUpperCase()
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0016HTE -------------------------
//
//-------------------------- test case HTML-0017HTE ---------------------------
//
// Testing feature - The "summary" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "summary" attribute. It
// It should be set to "HTML CONTROL TABLE".
//
// Semantic Requirements: 17
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0017HTE()
{
var computedValue = "";
var expectedValue = "HTML CONTROL TABLE";
var results = "";
var testNode = "";
results = new testResults("HTML0017HTE");
results.description = "The \"summary\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "summary" attribute.
//
computedValue = testNode.node.summary;
computedValue = computedValue.toUpperCase()
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0017HTE -------------------------
//
//-------------------------- test case HTML-0018HTE ---------------------------
//
// Testing feature - The "width" attribute of the HTMLTableElement
// interface.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and examine its "width" attribute. It
// It should be set to "680".
//
// Semantic Requirements: 17
//
// Last modification date - July 27, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0018HTE()
{
var computedValue = "";
var expectedValue = "680";
var results = "";
var testNode = "";
results = new testResults("HTML0018HTE");
results.description = "The \"width\" attribute of the "+
"HTMLTableElement interface.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and examine its "width" attribute.
//
computedValue = testNode.node.width;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0018HTE -------------------------
//
//-------------------------- test case HTML-0019HTE ---------------------------
//
// Testing feature - The "createTHead()" method of the HTMLTableElement
// interface creates a table header row.
//
// Testing approach - Retrieve the second TABLE element of the testing
// document and invoke its "createTHead()" method.
// It should create a new table head element with
// zero rows.
//
// Semantic Requirements: 18
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0019HTE()
{
var computedValue = "";
var expectedValue = 0;
var results = "";
var testNode = "";
var tableHead = "";
results = new testResults("HTML0019HTE");
results.description = "The \"createTHead()\" method of the "+
"HTMLTableElement interface creates a "+
"table header row.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and invoke its "createTHead" method.
//
testNode.node.createTHead();
tableHead = getTableHead(testNode.node);
computedValue = tableHead.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0019HTE -------------------------
//
//-------------------------- test case HTML-0020HTE ---------------------------
//
// Testing feature - The "createTHead()" method of the HTMLTableElement
// interface returns an existing table header
// element (if one exists).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "createTHead()" method.
// It should return the existing THEAD element whose
// "align" attribute is equal to "center" and its
// "rows" attribute is equal to 1.
//
// Semantic Requirements: 19
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0020HTE()
{
var computedValue = "";
var expectedValue = "CENTER 1";
var results = "";
var testNode = "";
var tableHead = "";
results = new testResults("HTML0020HTE");
results.description = "The \"createTHead()\" method of the "+
"HTMLTableElement interface returns an "+
"existing table header element.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "createTHead()" method.
//
tableHead = testNode.node.createTHead();
computedValue = tableHead.align+" ";
computedValue += tableHead.rows.length;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0020HTE -------------------------
//
//-------------------------- test case HTML-0021HTE ---------------------------
//
// Testing feature - The "deleteTHead()" method of the HTMLTableElement
// interface deletes the header from the table.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteTHead()" method.
// It should delete the THEAD element and the number of
// rows in the table should be 6 now.
//
// Semantic Requirements: 20
//
// Last modification date - September 30, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0021HTE()
{
var computedValue = "";
var expectedValue = 6;
var results = "";
var testNode = "";
results = new testResults("HTML0021HTE");
results.description = "The \"deleteTHead()\" method of the "+
"HTMLTableElement interface deletes the"+
"header from the table.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteTHead()" method.
//
testNode.node.deleteTHead();
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0021HTE -------------------------
//
//-------------------------- test case HTML-0022HTE ---------------------------
//
// Testing feature - The "createTFoot()" method of the HTMLTableElement
// interface creates a table foot element (TFOOT).
//
// Testing approach - Retrieve the second TABLE element of the testing
// document and invoke its "createTFoot()" method.
// It should create a TFOOT element with zero rows.
//
// Semantic Requirements: 21
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0022HTE()
{
var computedValue = "";
var expectedValue = 0;
var results = "";
var testNode = "";
var tableFoot = "";
results = new testResults("HTML0022HTE");
results.description = "The \"createTFoot()\" method of the "+
"HTMLTableElement interface creates a "+
"table footer row.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and invoke its "createTFoot()" method.
//
testNode.node.createTFoot();
tableFoot = getTableFoot(testNode.node);
computedValue = tableFoot.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0022HTE -------------------------
//
//-------------------------- test case HTML-0023HTE ---------------------------
//
// Testing feature - The "createTFoot()" method of the HTMLTableElement
// interface returns an existing table foot (TFOOT)
// element if one exists.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "createTFoot()" method.
// It should return the existing TFOOT element whose
// "align" attribute is "center" and it should
// contain one row.
//
// Semantic Requirements: 22
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0023HTE()
{
var computedValue = "";
var expectedValue = "CENTER 1";
var results = "";
var testNode = "";
var tableFoot = "";
results = new testResults("HTML0023HTE");
results.description = "The \"createTFoot()\" method of the "+
"HTMLTableElement interface returns a "+
"existing footer element(TFOOT).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "createTFoot()" method.
//
tableFoot = testNode.node.createTFoot();
computedValue = tableFoot.align+" ";
computedValue += tableFoot.rows.length;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0023HTE -------------------------
//
//-------------------------- test case HTML-0024HTE ---------------------------
//
// Testing feature - The "deleteTFoot()" method of the HTMLTableElement
// interface deletes the footer from the table.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteTFoot()" method.
// It should delete the TFOOT element and the number
// of rows should be 6 now.
//
// Semantic Requirements: 23
//
// Last modification date - September 30, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0024HTE()
{
var computedValue = "";
var expectedValue = 6;
var results = "";
var testNode = "";
results = new testResults("HTML0024HTE");
results.description = "The \"deleteTFoot()\" method of the "+
"HTMLTableElement interface deletes the "+
"footer from the table.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteTFoot()" method.
//
testNode.node.deleteTFoot();
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0024HTE -------------------------
//
//-------------------------- test case HTML-0025HTE ---------------------------
//
// Testing feature - The "createCaption()" method of the HTMLTableElement
// interface creates a new table caption object.
//
// Testing approach - Retrieve the second TABLE element of the testing
// document and invoke its "createCaption()" method.
// It should create a new table caption element with
// a the "align" attribute set to "".
//
// Semantic Requirements: 24
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0025HTE()
{
var computedValue = "";
var expectedValue = "";
var results = "";
var testNode = "";
var tableCaption = "";
results = new testResults("HTML0025HTE");
results.description = "The \"createCaption()\" method of the "+
"HTMLTableElement interface creates a "+
"table caption object.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,SECOND);
//
// and invoke its "createCaption" method.
//
testNode.node.createCaption();
tableCaption = getTableCaption(testNode.node);
computedValue = tableCaption.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0025HTE -------------------------
//
//-------------------------- test case HTML-0026HTE ---------------------------
//
// Testing feature - The "createCaption()" method of the HTMLTableElement
// interface returns an existing table caption
// element (if one exists).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "createCaption()" method.
// It should return the existing CAPTION element whose
// "align" attribute is equal to "TOP".
//
// Semantic Requirements: 25
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0026HTE()
{
var computedValue = "";
var expectedValue = "TOP";
var results = "";
var testNode = "";
var tableCaption = "";
results = new testResults("HTML0026HTE");
results.description = "The \"createCaption()\" method of the "+
"HTMLTableElement interface returns an "+
"existing table caption element.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "createCaption()" method.
//
tableCaption = testNode.node.createCaption();
computedValue = tableCaption.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0026HTE -------------------------
//
//-------------------------- test case HTML-0027HTE ---------------------------
//
// Testing feature - The "deleteCaption()" method of the HTMLTableElement
// interface deletes the table caption.
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteCaption()" method.
// It should delete the CAPTION element and the "caption"
// attribute should be set to null now.
//
// Semantic Requirements: 26
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0027HTE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0027HTE");
results.description = "The \"deleteCaption()\" method of the "+
"HTMLTableElement interface deletes the "+
"table caption.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteCaption()" method.
//
testNode.node.deleteCaption();
computedValue = getTableCaption(testNode.node);
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0027HTE -------------------------
//
//-------------------------- test case HTML-0028HTE ---------------------------
//
// Testing feature - The "insertRow()" method of the HTMLTableElement
// interface inserts a new empty table row (insertion
// at the table head).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "insertRow()" with index
// equal to 0. This should cause the method to insert
// an empty row in the HEAD section of the table. The
// number of rows in the table is further checked.
//
// Semantic Requirements: 29
//
// Last modification date - July 28, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0028HTE()
{
var computedValue = "";
var expectedValue = 8;
var results = "";
var testNode = "";
results = new testResults("HTML0028HTE");
results.description = "The \"insertRow()\" method of the "+
"HTMLTableElement interface insert an "+
"empty row in the table (insert at the "+
"table's head).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "insertRow" method.
//
testNode.node.insertRow(0);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0028HTE -------------------------
//
//-------------------------- test case HTML-0029HTE ---------------------------
//
// Testing feature - The "insertRow()" method of the HTMLTableElement
// interface inserts a new empty table row (insertion
// at the table body).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "insertRow()" with index
// equal to 3. This should cause the method to insert
// an empty row in the BODY section of the table. The
// number of rows in the table is further checked.
//
// Semantic Requirements: 27
//
// Last modification date - July 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0029HTE()
{
var computedValue = "";
var expectedValue = 8;
var results = "";
var testNode = "";
results = new testResults("HTML0029HTE");
results.description = "The \"insertRow()\" method of the "+
"HTMLTableElement interface insert an "+
"empty row in the table (insert at the "+
"table's body).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "insertRow" method.
//
testNode.node.insertRow(3);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0029HTE -------------------------
//
//-------------------------- test case HTML-0030HTE ---------------------------
//
// Testing feature - The "insertRow()" method of the HTMLTableElement
// interface inserts a new empty table row (insertion
// at the table foot).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "insertRow()" with index
// equal to 6. This should cause the method to insert
// an empty row in the FOOT section of the table. The
// number of rows in the table is further checked.
//
// Semantic Requirements: 27
//
// Last modification date - July 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0030HTE()
{
var computedValue = "";
var expectedValue = 8;
var results = "";
var testNode = "";
results = new testResults("HTML0030HTE");
results.description = "The \"insertRow()\" method of the "+
"HTMLTableElement interface insert an "+
"empty row in the table (insert at the "+
"table's foot).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "insertRow" method.
//
testNode.node.insertRow(6);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0030HTE -------------------------
//
//-------------------------- test case HTML-0031HTE ---------------------------
//
// Testing feature - The "deleteRow()" method of the HTMLTableElement
// interface deletes a table row (delete at the table's
// head)
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteRow()" method with
// index equal to 0. This should cause the method to
// delete the first line in the table (THEAD section).
//
// Semantic Requirements: 28
//
// Last modification date - July 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0031HTE()
{
var computedValue = "";
var expectedValue = 6;
var results = "";
var testNode = "";
results = new testResults("HTML0031HTE");
results.description = "The \"deleteRow()\" method of the "+
"HTMLTableElement interface deletes a "+
"row from the table (delete at the "+
"table's head).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteRow" method.
//
testNode.node.deleteRow(0);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0031HTE -------------------------
//
//-------------------------- test case HTML-0032HTE ---------------------------
//
// Testing feature - The "deleteRow()" method of the HTMLTableElement
// interface deletes a row from the table (delete
// at the table's body).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteRow()" method with
// index equal to 3. This should cause the method to
// delete row number 4 (TBODY section of the table).
//
// Semantic Requirements: 28
//
// Last modification date - July 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0032HTE()
{
var computedValue = "";
var expectedValue = 6;
var results = "";
var testNode = "";
results = new testResults("HTML0032HTE");
results.description = "The \"deleteRow()\" method of the "+
"HTMLTableElement interface deletes a "+
"row from the table (delete at the "+
"table's body).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteRow" method.
//
testNode.node.deleteRow(3);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0032HTE -------------------------
//
//-------------------------- test case HTML-0033HTE ---------------------------
//
// Testing feature - The "deleteRow()" method of the HTMLTableElement
// interface deletes a table row from the table
// (delete at the table's foot).
//
// Testing approach - Retrieve the first TABLE element of the testing
// document and invoke its "deleteRow()" method with
// index equal to 6. This should cause the method to
// delete the last line of the table (at the TFOOT
// section).
//
// Semantic Requirements: 28
//
// Last modification date - July 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0033HTE()
{
var computedValue = "";
var expectedValue = 6;
var results = "";
var testNode = "";
results = new testResults("HTML0033HTE");
results.description = "The \"deleteRow()\" method of the "+
"HTMLTableElement interface deletes a "+
"row from the table (delete at the "+
"table's foot).";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(TABLE,FIRST);
//
// and invoke its "deleteRow" method.
//
testNode.node.deleteRow(4);
computedValue = testNode.node.rows.length;
//
// Write out results
//
resetHTMLData();
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0033HTE -------------------------