//**************************************************************************
//
//
// National Institute Of Standards and Technology
// DTS Version 1.1
//
// HTMLMapElement Interface
//**************************************************************************
function HTMLMapElement()
{
var tests = new Array (HTML0001HME(),HTML0002HME());
return tests;
}
//------------------------ test case HTML-0001HME -------------------------
//
// Testing feature - The "areas" attribute specifies a list of the areas
// defined by the image map.
//
// Testing approach - Retrieve the first MAP element from the testing
// document and examine its "areas" attribute. It should
// be set to an HTMLCollection of length 4. The "alt"
// attribute of each item in the list is further checked.
//
// Semantic Requirements: 1
//
// Last modification date - September 29, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0001HME()
{
var computedValue = "";
var expectedValue = "DOMAIN TEST SUITE ";
var results = "";
var testNode = "";
var mapAreas = "";
var listLength = "";
results = new testResults("HTML0001HME");
results.description = "The \"areas\" attribute specifies the "+
"areas defined for the image map.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(MAP,FIRST);
//
// and access its "areas" attribute.
//
mapAreas = testNode.node.areas;
listLength = mapAreas.length;
for (var i = 0; i < listLength; i++)
computedValue += mapAreas[i].alt+" ";
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0001HME --------------------------
//
//------------------------ test case HTML-0002HME --------------------------
//
// Testing feature - The "name" attribute specifies the names of the map.
//
// Testing approach - Retrieve the first MAP element from the testing
// document and examine its "name" attribute. It should
// be set to "dts-map".
//
// Semantic Requirements: 2
//
// Last modification date - August 16, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0002HME()
{
var computedValue = "";
var expectedValue = "DTS-MAP";
var results = "";
var testNode = "";
results = new testResults("HTML0002HME");
results.description = "The \"name\" attribute specifies the "+
"names of the map.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(MAP,FIRST);
//
// and access its "name" attribute.
//
computedValue = testNode.node.name;
computedValue = computedValue.toUpperCase();
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0002HME --------------------------