//************************************************************************** // // // National Institute Of Standards and Technology // DTS Version 1.1 // // HTMLAreaElement Interface //************************************************************************** function HTMLAreaElement() { var tests = new Array (HTML0001HAE(),HTML0002HAE(),HTML0003HAE(),HTML0004HAE(),HTML0005HAE(),HTML0006HAE(),HTML0007HAE(),HTML0008HAE()); return tests; } //------------------------ test case HTML-0001HAE ------------------------- // // Testing feature - The "accessKey" attribute specifies a single character // access key to give access to the control form. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "accessKey" attribute. It // should be set to "a". // // Semantic Requirements: 1 // // Last modification date - October 6, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0001HAE() { var computedValue = ""; var expectedValue = "A"; var results = ""; var testNode = ""; results = new testResults("HTML0001HAE"); results.description = "The \"access\" attribute specifies a single "+ "character access key to give access to the "+ "form control."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "accessKey" attribute. // computedValue = testNode.node.accessKey; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0001HAE -------------------------- // //------------------------ test case HTML-0002HAE -------------------------- // // Testing feature - The "alt" attribute specifies an alternate text for user // agents not rendering the normal content of this // element. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "alt" attribute. It // should be set to "DOMAIN". // // Semantic Requirements: 2 // // Last modification date - August 16, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0002HAE() { var computedValue = ""; var expectedValue = "DOMAIN"; var results = ""; var testNode = ""; results = new testResults("HTML0002HAE"); results.description = "The \"alt\" attribute specifies an alternate "+ "text for user agents not rendering the "+ "normal content of this element."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "alt" attribute. // computedValue = testNode.node.alt; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0002HAE -------------------------- // //------------------------ test case HTML-0003HAE -------------------------- // // Testing feature - The "coords" attribute specifies a comma-separated list // of lengths, defining an active region geometry. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "coords" attribute. It // should be set to "0,2,45,45". // // Semantic Requirements: 3 // // Last modification date - August 17, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0003HAE() { var computedValue = ""; var expectedValue = "0,2,45,45"; var results = ""; var testNode = ""; results = new testResults("HTML0003HAE"); results.description = "The \"coords\" attribute specifies a comma- "+ "separated list of lengths, defining an active "+ "region geometry."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "coords" attribute. // computedValue = testNode.node.coords; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0003HAE -------------------------- // //------------------------ test case HTML-0004HAE -------------------------- // // Testing feature - The "href" attribute specifies the URI of the linked // resource. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "href" attribute. It // should be set to // "./files/dletter.html" // // Semantic Requirements: 4 // // Last modification date - August 17, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0004HAE() { var computedValue = ""; var expectedValue = "./FILES/DLETTER.HTML"; var results = ""; var testNode = ""; results = new testResults("HTML0004HAE"); results.description = "The \"href\" attribute specifies the URI "+ "of the linked resource."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "href" attribute. // computedValue = testNode.node.href; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0004HAE -------------------------- // //------------------------ test case HTML-0005HAE -------------------------- // // Testing feature - The "noHref" attribute specifies that this area is // inactive. // // Testing approach - Retrieve the last AREA element from the testing // document and examine its "noHref" attribute. It // should be set to false. // // Semantic Requirements: 5 // // Last modification date - August 17, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0005HAE() { var computedValue = ""; var expectedValue = false; var results = ""; var testNode = ""; results = new testResults("HTML0005HAE"); results.description = "The \"noHref\" attribute specifies that "+ "this area is inactive."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,THIRD); // // and access its "noHref" attribute. // computedValue = testNode.node.noHref; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0005HAE -------------------------- // //------------------------ test case HTML-0006HAE -------------------------- // // Testing feature - The "shape" attribute specifies the shape of the active // area. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "shape" attribute. It // should be set to "rect". // // Semantic Requirements: 6 // // Last modification date - August 17, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0006HAE() { var computedValue = ""; var expectedValue = "RECT"; var results = ""; var testNode = ""; results = new testResults("HTML0006HAE"); results.description = "The \"shape\" attribute specifies the "+ "the shape of the active area."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "shape" attribute. // computedValue = testNode.node.shape; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0006HAE -------------------------- // //------------------------ test case HTML-0007HAE -------------------------- // // Testing feature - The "tabIndex" attribute specifies an index that // represents the element's position in the tabbing // order. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "tabIndex" attribute. It // should be set to 1. // // Semantic Requirements:7 // // Last modification date - August 17, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0007HAE() { var computedValue = ""; var expectedValue = 1; var results = ""; var testNode = ""; results = new testResults("HTML0007HAE"); results.description = "The \"tabIndex\" attribute specifies an "+ "index that represents the element's position "+ "in the tabbing order."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "tabIndex" attribute. // computedValue = testNode.node.tabIndex; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0007HAE -------------------------- // //------------------------ test case HTML-0008HAE -------------------------- // // Testing feature - The "target" attribute specifies the frame to render // render the resource in. // // Testing approach - Retrieve the first AREA element from the testing // document and examine its "target" attribute. It // should be set to "_blank". // // Semantic Requirements: 8 // // Last modification date - October 1, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0008HAE() { var computedValue = ""; var expectedValue = "_BLANK"; var results = ""; var testNode = ""; results = new testResults("HTML0008HAE"); results.description = "The \"target\" attribute specifies the "+ "frame to render the resource in."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(AREA,FIRST); // // and access its "target" attribute. // computedValue = testNode.node.target; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0008HAE --------------------------