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

function HTMLFieldSetElement()
{
   var tests = new Array (HTML0001FSE(),HTML0002FSE());
   return tests;
}

//------------------------ test case HTML-0001FSE -------------------------
//
// Testing feature - The "form" attribute returns the FORM containing
//                   this control. 
//
// Testing approach - Retrieve the "form" attribute of the second FIELDSET
//                    element of the testing document and examine its value.
//                    It should be equal to "form3". 
//
// Semantic Requirements: 1
//
// Last modification date - November 01, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0001FSE");
    results.description = "The \"form\" attribute returns the FORM "+
                          "containing this control.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(FIELDSET,FIRST);
//
// and access attribute.
//
// This line is commented out because browser doesn't find form
//    computedValue = testNode.node.form.id;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//------------------------ End test case HTML-0001 --------------------------
//
//------------------------  test case HTML-0002FSE   ------------------------
//
// Testing feature - The "form" attribute returns null if this control
//                   is not within the context of a form.
//
// Testing approach - Retrieve the "form" attribute of the first FIELDSET
//                    element of the testing document and examine its value.  
//                    It should be equal to null as this FIELDSET is not 
//                    within the context of a form.  
//
// Semantic Requirements: 2 
//
// Last modification date - October 7, 1999
//
// Written by: Carmelo Montanez 
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0002FSE");
    results.description = "The \"form\" attribute returns null if this "+
                          "control is not within the context of a form.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(FIELDSET,SECOND);
//
// and access attribute.
//
      computedValue = testNode.node.form;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//------------------------ End test case HTML-0002 --------------------------