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

function HTMLAppletElement()
{
   var tests = new Array (HTML0001HAPE(),HTML0002HAPE(),HTML0003HAPE(),HTML0004HAPE(),HTML0005HAPE(),HTML0006HAPE(),HTML0007HAPE(),HTML0008HAPE(),HTML0009HAPE(),HTML0010HAPE());
   return tests;
}

//------------------------ test case HTML-0001HAPE -------------------------
//
// Testing feature - The "align" attribute specifies the alignment of 
//                   this object (vertically or horizontally) with respect 
//                   to its sorrounding text.
//
// Testing approach - Retrieve the "align" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to "middle".
//
// Semantic Requirements: 1
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0001HAPE()
 {
   var computedValue = "";
   var expectedValue = "MIDDLE";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0001HAPE");
    results.description = "The \"align\" attribute specifies the alignment "+
                          "of this object with respect to its surrounding "+
                          "text.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// 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-0001HAPE -------------------------
//
//------------------------   test case HTML-0002HAPE   -------------------------
//
// Testing feature - The "alt" attribute specifies an alternate text for 
//                   user agents not rendering the normal context of this 
//                   element.
//
// Testing approach - Retrieve the "alt" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to "Applet number 1".
//
// Semantic Requirements: 2 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0002HAPE()
 {
   var computedValue = "";
   var expectedValue = "APPLET NUMBER 1";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0002HAPE");
    results.description = "The \"alt\" attribute specifies an alternate "+
                          "text for user agents not rendering the normal "+
                          "context of this element.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,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-0002HAPE -------------------------
//
//------------------------   test case HTML-0003HAPE   -------------------------
//
// Testing feature - The "archive" attribute specifies a comma-separated 
//                   archive list.
//
// Testing approach - Retrieve the "archive" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to the empty string.
//
// Semantic Requirements: 3 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0003HAPE");
    results.description = "The \"archive\" attribute specifies a "+
                          "comma-separated archive list.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "archive" attribute.
//
      computedValue = testNode.node.archive;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0003HAPE -------------------------
//
//------------------------   test case HTML-0004HAPE   -------------------------
//
// Testing feature - The "code" attribute specifies the applet class file.
//
// Testing approach - Retrieve the "code" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to "applet1.class".
//
// Semantic Requirements: 4 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0004HAPE()
 {
   var computedValue = "";
   var expectedValue = "APPLET1.CLASS";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0004HAPE");
    results.description = "The \"code\" attribute specifies the "+
                          "applet class file.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "code" attribute.
//
      computedValue = testNode.node.code;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0004HAPE -------------------------
//
//------------------------   test case HTML-0005HAPE   -------------------------
//
// Testing feature - The "codeBase" attribute specifies an optional base
//                   URI for the applet.
//
// Testing approach - Retrieve the "codeBase" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value.   It should be equal to the string stored
//                    in the variable BASE4.
//
// Semantic Requirements: 5 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0005HAPE()
 {
   var computedValue = "";
   var expectedValue = BASE4;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0005HAPE");
    results.description = "The \"codeBase\" attribute specifies an "+
                          "optional URI for the applet.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "codeBase" attribute.
//
      computedValue = testNode.node.codeBase;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0005HAPE -------------------------
//
//------------------------   test case HTML-0006HAPE   -------------------------
//
// Testing feature - The "height" attribute overrides the regular height.
//
// Testing approach - Retrieve the "height" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to 6.
//
// Semantic Requirements: 6 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0006HAPE()
 {
   var computedValue = "";
   var expectedValue = "6";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0006HAPE");
    results.description = "The \"height\" attribute overrides the "+
                          "regular height.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "height" attribute.
//
      computedValue = testNode.node.height;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0006HAPE -------------------------
//
//------------------------   test case HTML-0007HAPE   -------------------------
//
// Testing feature - The "hspace" attribute specifies the horizontal space.
//                   to the left and right of this image, applet or object.
//
// Testing approach - Retrieve the "hspace" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to 0.
//
// Semantic Requirements: 7 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0007HAPE()
 {
   var computedValue = "";
   var expectedValue = "0";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0007HAPE");
    results.description = "The \"hspace\" attribute specifies the "+
                          "horizontal space to the left and right "+
                          "of this applet.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "hspace" attribute.
//
      computedValue = testNode.node.hspace;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0007HAPE -------------------------
//
//------------------------   test case HTML-0008HAPE   -------------------------
//
// Testing feature - The "name" attribute specifies the name of the applet.
//
// Testing approach - Retrieve the "name" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to "applet1" 
//
// Semantic Requirements: 8 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0008HAPE()
 {
   var computedValue = "";
   var expectedValue = "APPLET1";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0008HAPE");
    results.description = "The \"name\" attribute specifies the "+
                          "name of the applet.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,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-0008HAPE -------------------------
//
//------------------------   test case HTML-0009HAPE   -------------------------
//
// Testing feature - The "vspace" attribute specifies the vertical space
//                   above and below this image, applet or object. 
//
// Testing approach - Retrieve the "vspace" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to 0 
//
// Semantic Requirements: 9 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0009HAPE()
 {
   var computedValue = "";
   var expectedValue = "0";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0009HAPE");
    results.description = "The \"vspace\" attribute specifies the "+
                          "vertical space above and below this applet.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "vspace" attribute.
//
      computedValue = testNode.node.vspace;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0009HAPE -------------------------
//
//------------------------   test case HTML-0010HAPE   -------------------------
//
// Testing feature - The "width" attribute overrides the regular width. 
//
// Testing approach - Retrieve the "width" attribute from the first 
//                    APPLET element of the testing document and examine 
//                    its value. It should be equal to 301. 
//
// Semantic Requirements: 10 
//
// Last modification date - September 14, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0010HAPE()
 {
   var computedValue = "";
   var expectedValue = "301";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0010HAPE");
    results.description = "The \"width\" attribute overrides the "+
                          "original width.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(APPLET,FIRST);
//
// and access its "width" attribute.
//
      computedValue = testNode.node.width;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0010HAPE -------------------------