//**************************************************************************
//
//
// National Institute Of Standards and Technology
// DTS Version 1.1
//
// HTMLLegendElement Interface
//**************************************************************************
function HTMLLegendElement()
{
var tests = new Array (HTML0001LEE(),HTML0002LEE(),HTML0003LEE(),HTML0004LEE());
return tests;
}
//------------------------ test case HTML-0001LEE-------------------------
//
// Testing feature - The "form" attribute returns the FORM containing
// this control.
//
// Testing approach - Retrieve the "form" attribute from the second
// LEGEND element of the testing document and
// examine its value. It should be equal to
// and HTMLFormElement whose name attribute is
// equal to "form3".
//
// Semantic Requirements: 1
//
// Last modification date - November 01, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0001LEE()
{
var computedValue = "";
var expectedValue = "FORM2";
var results = "";
var testNode = "";
results = new testResults("HTML0001LEE");
results.description = "The \"form\" attribute returns the FORM containing "+
"this control.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(LEGEND,FIRST);
//
// and access attribute.
//
// computedValue = testNode.node.form.id;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//---------------------- end test case HTML-0001LEE ----------------------
//
//------------------------ test case HTML-0002LEE-------------------------
//
// Testing feature - The "form" attribute returns null if this control is not
// within the context of a form.
//
// Testing approach - Retrieve the "form" attribute from the first
// LEGEND element of the testing document and
// examine its value. It should be equal to
// null.
//
// Semantic Requirements:2
//
// Last modification date - October 25, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0002LEE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0002LEE");
results.description = "The \"form\" attribute returns null if this control "+
"is not within the context of a form.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(LEGEND,SECOND);
//
// and access attribute.
//
computedValue = testNode.node.form;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//---------------------- end test case HTML-0002LEE ----------------------
//
//------------------------ test case HTML-0003LEE-------------------------
//
// Testing feature - The "accessKey" attribute is a single character
// access key to give access to the form control.
//
// Testing approach - Retrieve the "accessKey" attribute from the
// second LEGEND element of the testing document
// and examine its value. It should be equal to
// "e".
//
// Semantic Requirements 3:
//
// Last modification date - October 25, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0003LEE()
{
var computedValue = "";
var expectedValue = "E";
var results = "";
var testNode = "";
results = new testResults("HTML0003LEE");
results.description = "The \"accessKey\" attribute is a single "+
"character access key to give access to the "+
"form control.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(LEGEND,FIRST);
//
// and access attribute.
//
computedValue = testNode.node.accessKey;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//---------------------- end test case HTML-0003LEE ----------------------
//
//------------------------ test case HTML-0004LEE-------------------------
//
// Testing feature - The "align" attribute contains the text alignment
// relative to FIELDSET.
//
// Testing approach - Retrieve the "form" attribute from the second
// LEGEND element of the testing document and
// examine its value. It should be equal to
// "TOP".
//
// Semantic Requirements: 4
//
// Last modification date - October 6, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0004LEE()
{
var computedValue = "";
var expectedValue = "TOP";
var results = "";
var testNode = "";
results = new testResults("HTML0004LEE");
results.description = "The \"align\" attribute contains the text "+
"alignment relative to FILEDSET.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(LEGEND,FIRST);
//
// and access attribute.
//
computedValue = testNode.node.align;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//---------------------- end test case HTML-0004LEE ----------------------