//************************************************************************** // // // National Institute Of Standards and Technology // DTS Version 1.1 // // HTMLHRElement Interface //************************************************************************** function HTMLHRElement() { var tests = new Array (HTML0001HHRE(),HTML0002HHRE(),HTML0003HHRE(),HTML0004HHRE()); return tests; } //------------------------ test case HTML-0001HHRE ------------------------- // // Testing feature - The "align" attribute specifies the rule alignment // on the page. // // Testing approach - Retrieve the "align" attribute from the first // HR element of the testing document and examine its // value. // // Semantic Requirements: 1 // // Last modification date - August 19, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0001HHRE() { var computedValue = ""; var expectedValue = "CENTER"; var results = ""; var testNode = ""; results = new testResults("HTML0001HHRE"); results.description = "The \"align\" attribute specifies the "+ "rule alignment on the page."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(HR); // // and 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-0001HHRE -------------------------- // //------------------------ test case HTML-0002HHRE -------------------------- // // Testing feature - The "noShade" attribute specifies that the rule should // be drawn as a solid color. // // Testing approach - Retrieve the "noShade" attribute from the first // HR element of the testing document and examine its // value. // // Semantic Requirements: 2 // // Last modification date - August 19, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0002HHRE() { var computedValue = ""; var expectedValue = true; var results = ""; var testNode = ""; results = new testResults("HTML0002HHRE"); results.description = "The \"noShade\" attribute specifies that the "+ "rule should be drawn as a solid color."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(HR); // // and access its "noShade" attribute. // computedValue = testNode.node.noShade; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0002HHRE -------------------------- // //------------------------ test case HTML-0003HHRE -------------------------- // // Testing feature - The "size" attribute specifies the height of the rule. // // Testing approach - Retrieve the "size" attribute from the first // HR element of the testing document and examine its // value. // // Semantic Requirements: 3 // // Last modification date - August 19, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0003HHRE() { var computedValue = ""; var expectedValue = "5"; var results = ""; var testNode = ""; results = new testResults("HTML0003HHRE"); results.description = "The \"size\" attribute specifies the "+ "height of the rule."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(HR); // // and access its "size" attribute. // computedValue = testNode.node.size; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0003HHRE -------------------------- // //------------------------ test case HTML-0004HHRE -------------------------- // // Testing feature - The "width" attribute specifies the width of the rule. // // Testing approach - Retrieve the "width" attribute from the first // HR element of the testing document and examine its // value. // // Semantic Requirements: 4 // // Last modification date - September 30, 1999 // // Written by: Carmelo Montanez //---------------------------------------------------------------------------- function HTML0004HHRE() { var computedValue = ""; var expectedValue = "400"; var results = ""; var testNode = ""; results = new testResults("HTML0004HHRE"); results.description = "The \"width\" attribute specifies the "+ "width of the rule."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(HR); // // and access its "width" attribute. // computedValue = testNode.node.width; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0004HHRE --------------------------