//************************************************************************** // // // National Institute Of Standards and Technology // DTS Version 1.1 // // HTMLStyleElement Interface //************************************************************************** function HTMLStyleElement() { var tests = new Array (HTML0001HSTE(),HTML0002HSTE(),HTML0003HSTE()); return tests; } //------------------------ test case HTML-0001HSTE ------------------------- // // Testing feature - The "disabled" attribute enabels the style sheet. // // Testing approach - Retrieve the "disabled" attribute from the HTML // element of the testing document and examine its // value. It should be equal to "true". // // Semantic Requirements: 1 // // Last modification date - November 01, 1999 // // Written by: Mark LaRoy Zimmerman //---------------------------------------------------------------------------- function HTML0001HSTE() { var computedValue = ""; var expectedValue = true; var results = ""; var testNode = ""; results = new testResults("HTML0001HSTE"); results.description = "The \"disabled\" attribute enables "+ "the style sheet."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(STYLE); // // and access its "disabled" attribute. // testNode.node.disabled=true; computedValue = testNode.node.disabled; // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0001HSTE ------------------------- // //------------------------ test case HTML-0002HSTE ------------------------- // // Testing feature - The "media" attribute is designed for use with one or // more target media. // // Testing approach - Retrieve the "media" attribute from the HTML // element of the testing document and examine its // value. It should be equal to "Screen". // // Semantic Requirements: 2 // // Last modification date - October 29, 1999 // // Written by: Mark LaRoy Zimmerman //---------------------------------------------------------------------------- function HTML0002HSTE() { var computedValue = ""; var expectedValue = "SCREEN"; var results = ""; var testNode = ""; results = new testResults("HTML0002HSTE"); results.description = "The \"media\" attribute is designed for use "+ "with one or more target media."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(STYLE); // // and access its "media" attribute. // computedValue = testNode.node.media; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0002HSTE ------------------------- // //------------------------ test case HTML-0003HSTE ------------------------- // // Testing feature - The "type" attribute is the style sheet language // (Internet media type). // // Testing approach - Retrieve the "type" attribute from the HTML // element of the testing document and examine its // value. It should be equal to "html/css". // // Semantic Requirements: 3 // // Last modification date - October 29, 1999 // // Written by: Mark LaRoy Zimmerman //---------------------------------------------------------------------------- function HTML0003HSTE() { var computedValue = ""; var expectedValue = "TEXT/CSS"; var results = ""; var testNode = ""; results = new testResults("HTML0003HSTE"); results.description = "The \"type\" attribute is the style sheet language "+ "(Internet media type)."; // // Retrieve targeted data. // testNode = new HTMLNodeObject(STYLE); // // and access its "type" attribute. // computedValue = testNode.node.type; computedValue = computedValue.toUpperCase(); // // Write out results // results.expected = expectedValue; results.actual = computedValue; return results; } //------------------------ End test case HTML-0003HSTE -------------------------