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

function HTMLIFrameElement()
{
   var tests = new Array (HTML0001HIFE(),HTML0002HIFE(),HTML0003HIFE(),HTML0004HIFE(),HTML0005HIFE(),HTML0006HIFE(),HTML0007HIFE(),HTML0008HIFE(),HTML0009HIFE(),HTML0010HIFE());
   return tests;
}

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

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

    results = new testResults("HTML0001HIFE");
    results.description = "The \"align\" attribute aligns this "+
                          "object with respect to its surrounding "+
                          "text.";
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// 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-0001HIFE -------------------------
//
//------------------------   test case HTML-0002HIFE   -------------------------
//
// Testing feature - The "frameBorder" attribute requests frame borders 
//                   (if set to 1).

// Testing approach - Retrieve the "frameBorder" attribute from the first 
//                    IFRAME element of the testing document and
//                    examine its value. It should be equal to 1.
//
// Semantic Requirements: 2 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0002HIFE");
    results.description = "The \"frameBorder\" attribute requests "+
                          "that frame borders be drawn.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "frameBorder" attribute.
//
      computedValue = testNode.node.frameBorder;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0002HIFE -------------------------
//
//------------------------   test case HTML-0003HIFE   -------------------------
//
// Testing feature - The "height" attribute specifies the frame height.

// Testing approach - Retrieve the "height" attribute from the first 
//                    IFRAME element of the testing document and
//                    examine its value. It should be equal to 100. 
//
// Semantic Requirements: 3 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0003HIFE");
    results.description = "The \"height\" attribute specifies "+
                          "the frame's height.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "height" attribute.
//
      computedValue = testNode.node.height;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0003HIFE -------------------------
//
//------------------------   test case HTML-0004HIFE   -------------------------
//
// Testing feature - The "longDesc" specifies a URI designating a
//                   long description of this image or frame.

// Testing approach - Retrieve the "longDesc" attribute from the first 
//                    IFRAME element of the testing document and
//                    examine its value. It should be equal to 
//                    "./files/desc.html". 
//
// Semantic Requirements: 4 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0004HIFE()
 {
   var computedValue = "";
   var expectedValue = "./FILES/DESC.HTML";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0004HIFE");
    results.description = "The \"longDesc\" attribute specifies "+
                          "a URI designating a long description of "+
                          "this image or frame.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "longDesc" attribute.
//
      computedValue = testNode.node.longDesc;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0004HIFE -------------------------
//
//------------------------   test case HTML-0005HIFE   -------------------------
//
// Testing feature - The "marginHeight" attribute specifies the margin height
//                   in pixels.

// Testing approach - Retrieve the "marginHeight" attribute from the 
//                    first IFRAME element of the testing document and
//                    examine its value. It should be equal to 5. 
//
// Semantic Requirements: 5 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0005HIFE");
    results.description = "The \"marginHeight\" attribute specifies "+
                          "the margin height in pixels.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "marginHeight" attribute.
//
      computedValue = testNode.node.marginHeight;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0005HIFE -------------------------
//
//------------------------   test case HTML-0006HIFE   -------------------------
//
// Testing feature - The "marginWidth" attribute specifies the margin width 
//                   in pixels.

// Testing approach - Retrieve the "marginWidth" attribute from the 
//                    first IFRAME element of the testing document and
//                    examine its value. It should be equal to 5. 
//
// Semantic Requirements: 6 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0006HIFE");
    results.description = "The \"marginWidth\" attribute specifies "+
                          "the margin width in pixels.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "marginWidth" attribute.
//
      computedValue = testNode.node.marginWidth;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0006HIFE -------------------------
//
//------------------------   test case HTML-0007HIFE   -------------------------
//
// Testing feature - The "name" attribute specifies the frame name. 
//
// Testing approach - Retrieve the "name" attribute from the 
//                    first IFRAME element of the testing document and
//                    examine its value. It should be equal to "iFrame1". 
//
// Semantic Requirements: 7 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0007HIFE");
    results.description = "The \"name\" attribute specifies "+
                          "the frame's name.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// 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-0007HIFE -------------------------
//
//------------------------   test case HTML-0008HIFE   -------------------------
//
// Testing feature - The "scrolling" attribute specifies whether or not
//                   the frame should have scrollbars. 
//
// Testing approach - Retrieve the "scrolling" attribute from the 
//                    first IFRAME element of the testing document and
//                    examine its value. It should be equal to "yes". 
//
// Semantic Requirements: 8 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0008HIFE");
    results.description = "The \"scrolling\" attribute specifies "+
                          "whether or not the frame should have "+
                          "scrollbars.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "scrolling" attribute.
//
      computedValue = testNode.node.scrolling;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0008HIFE -------------------------
//
//------------------------   test case HTML-0009HIFE   -------------------------
//
// Testing feature - The "src" attribute specifies a URI designating the 
//                   initial frame contents.. 
//
// Testing approach - Retrieve the "src" attribute from the first
//                    IFRAME element of the testing document and
//                    examine its value. It should be equal to 
//                    "./files/iframe.html". 
//
// Semantic Requirements: 9 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function HTML0009HIFE()
 {
   var computedValue = "";
   var expectedValue = "./FILES/IFRAME.HTML";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0009HIFE");
    results.description = "The \"src\" attribute specifies a URI "+
                          "designating the initial frame contents.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// 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-0009HIFE -------------------------
//
//------------------------   test case HTML-0010HIFE   -------------------------
//
// Testing feature - The "width" attribute specifies the frame's width. 
//
// Testing approach - Retrieve the "width" attribute from the first
//                    IFRAME element of the testing document and
//                    examine its value.  It should be equal to 300.
//
// Semantic Requirements: 10 
//
// Last modification date - October 1, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

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

    results = new testResults("HTML0010HIFE");
    results.description = "The \"width\" attribute specifies the "+
                          "frame's width.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(IFRAME);
//
// and access its "width" attribute.
//
      computedValue = testNode.node.width;
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}

//------------------------ End test case HTML-0010HIFE -------------------------