//**************************************************************************
//
//
//                       National Institute Of Standards and Technology
//                                    DTS Version 1.1
//         
//                              HTMLScriptElement Interface
//**************************************************************************

function HTMLScriptElement()
{
   var tests = new Array (HTML0001HSCE(),HTML0002HSCE(),HTML0003HSCE(),HTML0004HSCE(),HTML0005HSCE());
   return tests;
}

//------------------------ test case HTML-0001HSCE -------------------------
//
// Testing feature - The "text" attribute specifies the script content
//                   of the element.
//
// Testing approach - Retrieve the "text" attribute from the first 
//                    SCRIPT element of the testing document and 
//                    examine its value. 
//
// Semantic Requirements: 1
//
// Last modification date - September 22, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0001HSCE()
 {
   var computedValue = "";
   var expectedValue = "VAR A = 2;";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0001HSCE");
    results.description = "The \"text\" attribute specifies the "+
                          "script content of the element.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(SCRIPT,SECOND);
//
// and access its "text" attribute.
//
      computedValue = testNode.node.text;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0001HSCE -------------------------
//
//------------------------   test case HTML-0002HSCE   -------------------------
//
// Testing feature - The "charset" attribute specifies the character
//                   encoding of the linked resource.
//
// Testing approach - Retrieve the "charset" attribute from the first 
//                    SCRIPT element of the testing document and 
//                    examine its value.  It should be equal to
//                    "US-ASCII".
//
// Semantic Requirements: 2 
//
// Last modification date - September 22, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0002HSCE()
 {
   var computedValue = "";
   var expectedValue = "US-ASCII";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0002HSCE");
    results.description = "The \"charset\" attribute specifies the "+
                          "character encoding of the linked resource.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(SCRIPT,SECOND);
//
// and access its "charset" attribute.
//
      computedValue = testNode.node.charset;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0002HSCE -------------------------
//
//------------------------   test case HTML-0003HSCE   -------------------------
//
// Testing feature - The "defer" attribute specifies that the user
//                   agent can defer processing of the script. 
//
// Testing approach - Retrieve the "defer" attribute from the first 
//                    SCRIPT element of the testing document and 
//                    examine its value.  It should be equal to
//                    true.
//
// Semantic Requirements: 3 
//
// Last modification date - September 22, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0003HSCE()
 {
   var computedValue = "";
   var expectedValue = true;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0003HSCE");
    results.description = "The \"defer\" attribute specifies that "+
                          "user agent can defer processing of the "+
                          "script";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(SCRIPT,SECOND);
//
// and access its "defer" attribute.
//
      computedValue = testNode.node.defer;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0003HSCE -------------------------
//
//------------------------   test case HTML-0004HSCE   -------------------------
//
// Testing feature - The "src" attribute specifies a URI designating
//                   an external script. 
//
// Testing approach - Retrieve the "src" attribute from the first 
//                    SCRIPT element of the testing document and 
//                    examine its value.  It should be equal 
//                    "./FILES/SCRIPT1.JS".
//
// Semantic Requirements: 4 
//
// Last modification date - September 22, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0004HSCE()
 {
   var computedValue = "";
   var expectedValue = "./FILES/SCRIPT1.JS";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0004HSCE");
    results.description = "The \"src\" attribute specifies a "+
                          "URI designating an external script.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(SCRIPT,SECOND);
//
// and access its "src" attribute.
//
      computedValue = testNode.node.src;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0004HSCE -------------------------
//
//------------------------   test case HTML-0006HSCE   -------------------------
//
// Testing feature - The "type" attribute specifies the content of the 
//                   script language.
//
// Testing approach - Retrieve the "type" attribute from the first 
//                    SCRIPT element of the testing document and 
//                    examine its value.  It should be equal to
//                    "text/JavaScript"".
//
// Semantic Requirements: 5 
//
// Last modification date - September 22, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0005HSCE()
 {
   var computedValue = "";
   var expectedValue = "TEXT/JAVASCRIPT";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0005HSCE");
    results.description = "The \"type\" attribute specifies the "+
                          "contents of the script language";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(SCRIPT,SECOND);
//
// 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-0005HSCE -------------------------