//**************************************************************************
//
// National Institute Of Standards and Technology
// DTS Version 1.1
//
// HTMLTableColElement Interface
//**************************************************************************
function HTMLTableColElement()
{
var tests = new Array (HTML0001HTCE(),HTML0002HTCE(),HTML0003HTCE(),HTML0004HTCE(),HTML0005HTCE(),HTML0006HTCE(),HTML0007HTCE(),HTML0008HTCE(),HTML0009HTCE(),HTML0010HTCE(),HTML0011HTCE(),HTML0012HTCE());
return tests;
}
//------------------------ test case HTML-0001HTCE -------------------------
//
// Testing feature - The "align" attribute specifies the horizontal
// alignment of cell data in a column. (COL)
//
// Testing approach - Retrieve the first COL element from the testing document
// and examine its "align" attribute. It should be equal to
// "center".
//
// Semantic Requirements: 1
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0001HTCE()
{
var computedValue = "";
var expectedValue = "CENTER";
var results = "";
var testNode = "";
results = new testResults("HTML0001HTCE");
results.description = "The \"align\" attribute specifies the horizontal "+
"alignment of cell data in a column. (COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// Access 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-0001HTCE --------------------------
//
//------------------------ test case HTML-0002HTCE -------------------------
//
// Testing feature - The "align" attribute specifies the horizontal
// alignment of cell data in a column. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing
// document and examine its "align" attribute. It should
// be equal to "center".
//
// Semantic Requirements: 1
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0002HTCE()
{
var computedValue = "";
var expectedValue = "CENTER";
var results = "";
var testNode = "";
results = new testResults("HTML0002HTCE");
results.description = "The \"align\" attribute specifies the horizontal "+
"alignment of cell data in a column."+
"(COLGROUP)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// Access 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-0002HTCE --------------------------
//
//------------------------ test case HTML-0003HTCE -------------------------
//
// Testing feature - The "ch" attribute specifies the alignment
// character for cells in a column. (COL)
//
// Testing approach - Retrieve the first COL element from the testing
// document and set its "ch" attribute to "A". Retrieve
// the attribuet back and examine its value.
//
// Semantic Requirements:2
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0003HTCE()
{
var computedValue = "";
var expectedValue = "A";
var results = "";
var testNode = "";
results = new testResults("HTML0003HTCE");
results.description = "The \"ch\" attribute specifies the alignment "+
"character for cells in a column. (COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// set/retrieve its "ch" attribute.
//
testNode.node.ch = "A";
computedValue = testNode.node.ch;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0003HTCE --------------------------
//
//------------------------ test case HTML-0004HTCE -------------------------
//
// Testing feature - The "ch" attribute specifies the alignment
// character for cells in a column. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing
// document and set its "ch" attribute to "1". Retrieve
// the attribute back and examine its value.
//
// Semantic Requirements: 2
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0004HTCE()
{
var computedValue = "";
var expectedValue = "1";
var results = "";
var testNode = "";
results = new testResults("HTML0004HTCE");
results.description = "The \"ch\" attribute specifies the alignment "+
"character for cells in a column. (COLGROUP)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// set/retrieve its "ch" attribute.
//
testNode.node.ch="1";
computedValue = testNode.node.ch;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0004HTCE --------------------------
//
//------------------------ test case HTML-0005HTCE -------------------------
//
// Testing feature - The "chOff" attribute specifies the offset
// of alignment character. (COL)
//
// Testing approach - Retrieve the first COL element from the testing document
// and set its "chOff" attribute to 25. Retrieve the
// attribute back and examine its value.
//
// Semantic Requirements: 3
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0005HTCE()
{
var computedValue = "";
var expectedValue = 25;
var results = "";
var testNode = "";
results = new testResults("HTML0005HTCE");
results.description = "The \"chOff\" attribute specifies the offset "+
"of alignment character. (COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// set/retrieve its "chOff" attribute.
//
testNode.node.chOff = 25;
computedValue = testNode.node.chOff;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0005HTCE --------------------------
//
//------------------------ test case HTML-0006HTCE -------------------------
//
// Testing feature - The "chOff" attribute specifies the offset
// of alignment character. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing
// document and set its "chOff" attribute to "10".
// Retrieve the attribute back and examine its value.
//
// Semantic Requirements: 3
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0006HTCE()
{
var computedValue = "";
var expectedValue = 10;
var results = "";
var testNode = "";
results = new testResults("HTML0006HTCE");
results.description = "The \"chOff\" attribute specifies the offset "+
"of alignment character. (COLGROUP)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// set/retrieve its "chOff" attribute.
//
testNode.node.chOff=10;
computedValue = testNode.node.chOff;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0006HTCE --------------------------
//
//------------------------ test case HTML-0007HTCE -------------------------
//
// Testing feature - The "span" attribute indicates the number of
// columns in a group or affected by grouping. (COL)
//
// Testing approach - Retrieve the COL element from the testing document and
// examine its "span" attribute to 1. It should be equal
// to 1.
//
// Semantic Requirements: 4
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0007HTCE()
{
var computedValue = "";
var expectedValue = 1;
var results = "";
var testNode = "";
results = new testResults("HTML0007HTCE");
results.description = "The \"span\" attribute indicates the number of "+
"columns in a group or affected by grouping."+
"(COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// Access its "span" attribute.
//
computedValue = testNode.node.span;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0007HTCE --------------------------
//
//------------------------ test case HTML-0008HTCE -------------------------
//
// Testing feature - The "span" attribute indicates the number of
// columns in a group or affected by grouping. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing
// document an the examine its "span" attribute. It should
// be equal to 2.
//
// Semantic Requirements: 4
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0008HTCE()
{
var computedValue = "";
var expectedValue = 2;
var results = "";
var testNode = "";
results = new testResults("HTML0008HTCE");
results.description = "The \"span\" attribute indicates the number of "+
"columns in a group or affected by grouping."+
"(COLGROUP)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// Access its "span" attribute.
//
computedValue = testNode.node.span;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0008HTCE --------------------------
//
//------------------------ test case HTML-0009HTCE ------------------------------
//
// Testing feature - The "vAlign" attribute specifies the vertical
// alignment of cell data in a column. (COL)
//
// Testing approach - Retrieve the first COL element from the testing
// document and access its "vAlign" attribute. It
// should be equal to "middle".
//
// Semantic Requirements: 5
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0009HTCE()
{
var computedValue = "";
var expectedValue = "MIDDLE";
var results = "";
var testNode = "";
results = new testResults("HTML0009HTCE");
results.description = "The \"vAlign\" attribute specifies the vertical "+
"alignment of cell data in a column. (COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// Access its "vAlign" attribute.
//
computedValue = testNode.node.vAlign;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0009HTCE --------------------------
//
//------------------------ test case HTML-0010HTCE -------------------------
//
// Testing feature - The "vAlign" attribute specifies the vertical
// alignment of cell data in a column. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing.
// document and access the "vAlign" attribute. It should
// be equal to "middle"
//
// Semantic Requirements: 5
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0010HTCE()
{
var computedValue = "";
var expectedValue = "MIDDLE";
var results = "";
var testNode = "";
results = new testResults("HTML0010HTCE");
results.description = "The \"vAlign\" attribute specifies the vertical "+
"alignment of cell data in a column. (Test for COLGROUP Element)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// and access its "vAlign" attribute.
//
computedValue = testNode.node.vAlign;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0010HTCE --------------------------
//
//------------------------ test case HTML-0011HTCE ------------------------------
//
// Testing feature - The "width" attribute specifies the default column
// width. (COL)
//
// Testing approach - Retrieve the first COL element from the testing.
// document and access the "width" attribute. It
// should be equal to 20.
//
// Semantic Requirements: 6
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0011HTCE()
{
var computedValue = "";
var expectedValue = 20;
var results = "";
var testNode = "";
results = new testResults("HTML0011HTCE");
results.description = "The \"width\" attribute specifies the default "+
"column width. (COL)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COL,FIRST);
//
// Access its "width" attribute.
//
computedValue = testNode.node.width;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0011HTCE --------------------------
//
//------------------------ test case HTML-0012HTCE -------------------------
//
// Testing feature - The "width" attribute specifies the default
// column width. (COLGROUP)
//
// Testing approach - Retrieve the first COLGROUP element from the testing
// document and access the "width" attribute. It should
// be equal to 20.
//
// Semantic Requirements: 6
//
// Last Updated on: November 3, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0012HTCE()
{
var computedValue = "";
var expectedValue = 20;
var results = "";
var testNode = "";
results = new testResults("HTML0012HTCE");
results.description = "The \"width\" attribute specifies the default "+
"column width. (COLGROUP)";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(COLGROUP,FIRST);
//
// Access its "width" attribute.
//
computedValue = testNode.node.width;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0012HTCE --------------------------