//**************************************************************************
//
//
// National Institute Of Standards and Technology
// DTS Version 1.1
//
// HTMLFrameElement Interface
//**************************************************************************
function HTMLFrameElement()
{
var tests = new Array (HTML0001HFRE(),HTML0002HFRE(),HTML0003HFRE(),HTML0004HFRE(),HTML0005HFRE(),HTML0006HFRE(),HTML0007HFRE(),HTML0008HFRE());
return tests;
}
//------------------------ test case HTML-0001HFRE -------------------------
//
// Testing feature - The "frameBorder" attribute requests a frame broder
// (if set to 1)
//
// Testing approach - Retrieve the "frameBorder" attribute from the
// third FRAME element of the frameset testing document
// and examine its value. It should be equal to 1.
//
// Semantic Requirements: 1
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0001HFRE()
{
var computedValue = "";
var expectedValue = "1";
var results = "";
var testNode = "";
results = new testResults("HTML0001HFRE");
results.description = "The \"frameBorder\" attribute requests"+
"that a frame border be drawn.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// and access its "frameBorder" attribute.
//
computedValue = testNode.node.frameBorder;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0001HFRE -------------------------
//
//------------------------ test case HTML-0002HFRE -------------------------
//
// Testing feature - The "longDesc" attribute specifies a URI designating
// a long description of this image or frame..
//
// Testing approach - Retrieve the "longDesc" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to
// "./files/desc.html".
//
// Semantic Requirements: 2
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0002HFRE()
{
var computedValue = "";
var expectedValue = "./FILES/DESC.HTML";
var results = "";
var testNode = "";
results = new testResults("HTML0002HFRE");
results.description = "The \"longDesc\" attribute specifies a URI "+
"designating a long description of this "+
"image or frame.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// 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-0002HFRE -------------------------
//
//------------------------ test case HTML-0003HFRE -------------------------
//
// Testing feature - The "marginHeight" attribute specifies the frame's margin
// height in pixels.
//
// Testing approach - Retrieve the "marginHeight" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to 15.
//
// Semantic Requirements: 3
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0003HFRE()
{
var computedValue = "";
var expectedValue = "15";
var results = "";
var testNode = "";
results = new testResults("HTML0003HFRE");
results.description = "The \"marginHeight\" attribute specifies the "+
"frame's margin height in pixels.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// and access its "marginHeight" attribute.
//
computedValue = testNode.node.marginHeight;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0003HFRE -------------------------
//
//------------------------ test case HTML-0004HFRE -------------------------
//
// Testing feature - The "marginWidth" attribute specifies the frame's margin
// width in pixels.
//
// Testing approach - Retrieve the "marginWidth" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to 20.
//
// Semantic Requirements: 4
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0004HFRE()
{
var computedValue = "";
var expectedValue = "20";
var results = "";
var testNode = "";
results = new testResults("HTML0004HFRE");
results.description = "The \"marginWidth\" attribute specifies the "+
"frame's margin height in pixels.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// and access its "marginWidth" attribute.
//
computedValue = testNode.node.marginWidth;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0004HFRE -------------------------
//
//------------------------ test case HTML-0005HFRE -------------------------
//
// Testing feature - The "name" attribute specifies the frame's name.
//
// Testing approach - Retrieve the "name" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to
// "frame1".
//
// Semantic Requirements: 5
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0005HFRE()
{
var computedValue = "";
var expectedValue = "FRAME1";
var results = "";
var testNode = "";
results = new testResults("HTML0005HFRE");
results.description = "The \"name\" attribute specifies the "+
"frame's name.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,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-0005HFRE -------------------------
//
//------------------------ test case HTML-0006HFRE -------------------------
//
// Testing feature - The "noResize" attribute when true, forbid user from
// resizing frame.
//
// Testing approach - Retrieve the "noResize" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to
// true.
//
// Semantic Requirements: 6
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0006HFRE()
{
var computedValue = "";
var expectedValue = true;
var results = "";
var testNode = "";
results = new testResults("HTML0006HFRE");
results.description = "The \"noResize\" attribute when present, "+
"forbid the user from resizing the frame.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// and access its "noResize" attribute.
//
computedValue = testNode.node.noResize;
//
// Write out results
//
results.expected = expectedValue;
results.actual = computedValue;
return results;
}
//------------------------ End test case HTML-0006HFRE -------------------------
//
//------------------------ test case HTML-0007HFRE -------------------------
//
// Testing feature - The "scrolling" attribute specify whether or not the
// frame should have scrollbars.
//
// Testing approach - Retrieve the "scrolling" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to
// "no".
//
// Semantic Requirements: 7
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0007HFRE()
{
var computedValue = "";
var expectedValue = "NO";
var results = "";
var testNode = "";
results = new testResults("HTML0007HFRE");
results.description = "The \"scrolling\" attribute specify whether "+
"or not the frame should have scrollbars.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// 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-0007HFRE -------------------------
//
//------------------------ test case HTML-0008HFRE -------------------------
//
// Testing feature - The "src" attribute specify a URI designating the
// original frame contents.
//
// Testing approach - Retrieve the "src" attribute from the first
// FRAME element of the frameset testing document
// and examine its value. It should be equal to
// "./files/frame.html".
//
// Semantic Requirements: 8
//
// Last modification date - October 5, 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------
function HTML0008HFRE()
{
var computedValue = "";
var expectedValue = "./FILES/FRAME1.HTML";
var results = "";
var testNode = "";
results = new testResults("HTML0008HFRE");
results.description = "The \"src\" attribute specifies a URI "+
"designating the original frame contents.";
//
// Retrieve targeted data.
//
testNode = new HTMLNodeObject(FRAME,FIRST);
//
// 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-0008HFRE -------------------------