//**************************************************************************
//
// National Institute Of Standards and Technology
// DTS Version 1.1
//
// HTMLIsIndexElement Interface
//**************************************************************************
function HTMLIsIndexElement()
{
var tests = new Array (HTML0001IIE(),HTML0002IIE(),HTML0003IIE());
return tests;
}
//------------------------ test case HTML-0001IIE -------------------------
//
// Testing feature - The "form" attribute returns the FORM element
// containing this control.
//
// Testing approach - Retrieve the "form attribute from the first
// ISINDEX attribute and examine its value.
// It should be equal to an HTMLFormElement whose
// name attribute is equal to "form1".
//
// Semantic Requirements: 1
//
// Last Updated on: November 01, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0001IIE()
{
var computedValue = "";
var expectedValue = "FORM1";
var results = "";
var testNode = "";
results = new testResults("HTML0001IIE");
results.description = "The \"form\" attribute returns the FORM element "+
"containing the control";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(ISINDEX,FIRST);
//
// and access its "form" attribute.
//
// The below lines are commented out because of errors that stop test.
// computedValue = testNode.node.form.id;
// computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0001IIE --------------------------
//
//------------------------ test case HTML-0002IIE -------------------------
//
// Testing feature - The "form" attribute returns null if this control
// is not with the control of a form.
//
// Testing approach - Retrieve the "form" attribute from the second
// ISINDEX element and examine its value. It
// should return the null value.
//
// Semantic Requirements:2
//
// Last Updated on: October 6, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0002IIE()
{
var computedValue = "";
var expectedValue = null;
var results = "";
var testNode = "";
results = new testResults("HTML0002IIE");
results.description = "The \"form\" attribute returns null if this control "+
"is not within the control of a form.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(ISINDEX,SECOND);
//
// and access its "form" attribute.
//
//The below line is commented out because it stops test
// computedValue = testNode.node.form;
//
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0002IIE --------------------------
//
//------------------------ test case HTML-0003IIE -------------------------
//
// Testing feature - The "prompt" attribute contains the prompt message.
//
// Testing approach - Retrieve the "prompt" attribute from the second
// ISINDEX element of the testing document and
// examine its value. It should be equal to
// "New Employee:".
//
// Semantic Requirements: 1
//
// Last Updated on: October 6, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0003IIE()
{
var computedValue = "";
var expectedValue = "NEW EMPLOYEE: ";
var results = "";
var testNode = "";
results = new testResults("HTML0003IIE");
results.description = "The \"prompt\" attribute contains "+
"the prompt message";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(ISINDEX,FIRST);
//
// and access its "prompt" attribute.
//
//the below line is commented out because it stops the test
computedValue = testNode.node.prompt;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0003IIE --------------------------