//**************************************************************************
//
//
//                       National Institute Of Standards and Technology
//                                    DTS Version 1.1
//         
//                              HTMLTextAreaElement Interface
//**************************************************************************
function HTMLTextAreaElement()
{
   var tests = new Array (HTML0001TAE(),HTML0002TAE(),HTML0003TAE(),HTML0004TAE(),HTML0005TAE(),HTML0006TAE(),HTML0007TAE(),HTML0008TAE(),HTML0009TAE(),HTML0010TAE(),HTML0011TAE(),HTML0012TAE(),HTML0013TAE(),HTML0014TAE(),HTML0015TAE());
   return tests;
}
//------------------------ test case HTML-0001TAE -------------------------
//
// Testing feature - The "defaultValue" attribute represents the contents of the
//                   element.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "defaultValue" attribute.
//
// Semantic Requirements: 1
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
 function HTML0001TAE()
 {
   var computedValue = "";
   var expectedValue = "INTERVIEWER ENTER NOTES HERE!";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0001TAE");
    results.description = "The \"defaultValue\" attribute represents the "+
                          "contents of the element.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.defaultValue;
      computedValue = computedValue.toUpperCase();
//
// Write out results 
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0001TAE ----------------------
//
//------------------------ test case HTML-0002TAE -------------------------
//
// Testing feature - The "form" attribute returns the FORM containing
//                   this control.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "form" attribute.  It should
//                     be equal to an HTMLFormElement whose name attribute
//                     is equal to "form1".
//
// Semantic Requirements:2 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0002TAE()
 {
   var computedValue = "";
   var expectedValue = "FORM1";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0002TAE");
    results.description = "The \"form\" attribute returns the FORM "+
                          "containing this control.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.form.name;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0002TAE ----------------------
//
//------------------------  test case HTML-0003TAE ------------------------
//
// Testing feature - The "form" attribute returns null if this control
//                   is not within the context of a form.
//
// Testing approach -  Retrieve the second TEXTAREA element of the testing
//                     document and examine its "form" attribute.  It should 
//                     be equal to null since this control is not within
//                     a form context.
//
// Semantic Requirements:3 
//
// Last modification date - October 25, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0003TAE()
 {
   var computedValue = "";
   var expectedValue = null;
   var results = "";
   var testNode = "";

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

    return results;
}
//---------------------- end test case HTML-0003TAE -----------------------
//
//------------------------ test case HTML-0004TAE -------------------------
//
// Testing feature - The "accessKey" attribute is a single character access
//                   key to give access to the form control.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "accessKey" attribute.  it
//                     should be equal to "D".
//
// Semantic Requirements:4 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0004TAE()
 {
   var computedValue = "";
   var expectedValue = "D";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0004TAE");
    results.description = "The \"accessKey\" attribute is a single "+
                          "character access key to give access to the "+
                          "form control.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.accessKey;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0004TAE ----------------------
//
//------------------------ test case HTML-0005TAE -------------------------
//
// Testing feature - The "cols" attribute contains the width of control
//                   (in characters).
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "cols" attribute.  It should
//                     be equal to 30.
//
// Semantic Requirements:5 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0005TAE()
 {
   var computedValue = "";
   var expectedValue = 30;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0005TAE");
    results.description = "The \"cols\" attribute contains the width of "+
                          "control (in characters).";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.cols;
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end tes case HTML-0005TAE -----------------------
//
//------------------------ test case HTML-0006TAE -------------------------
//
// Testing feature - The "disabled" attribute has a TRUE value if it is 
//                   explicitly set.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "disabled" attribute. It 
//                     should be equal to true.
//
// Semantic Requirements:6 
//
// Last modification date - October 25 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0006TAE()
 {
   var computedValue = "";
   var expectedValue = true;

   var results = "";
   var testNode = "";

    results = new testResults("HTML0006TAE");
    results.description = "The \"disabled\" attribute has a TRUE value if "+
                          "it is explicitly set.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,SECOND);
//
// and access attribute.
//
      computedValue = testNode.node.disabled;
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0006TAE ----------------------
//
//------------------------ test case HTML-0007TAE -------------------------
//
// Testing feature - The "name" attribute is the form control or object 
//                   name when submitted with a form.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "name" attribute.  It should
//                     be equal to "notes".
//
// Semantic Requirements:7 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0007TAE()
 {
   var computedValue = "";
   var expectedValue = "NOTES";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0007TAE");
    results.description = "The \"name\" attribute is the form control or "+
                          "object name when submitted with a form.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.name;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0007TAE ----------------------
//
//------------------------ test case HTML-0008TAE -------------------------
//
// Testing feature - The "readOnly" attribute indicates that this control
//                   is read-only.
//
// Testing approach - Retrieve the second TEXTAREA element of the testing
//                    document and examine its "read-only" attribute.  It
//                    should be equal to true.
//
// Semantic Requirements:8 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0008TAE()
 {
   var computedValue = "";
   var expectedValue = true;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0008TAE");
    results.description = "The \"readOnly\" attribute indicates that this "+
                          "control is read-only.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,THIRD);
//
// and access attribute.
//
      computedValue = testNode.node.readOnly;
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0009TAE ----------------------
//
//------------------------ test case HTML-0009TAE -------------------------
//
// Testing feature - The "rows" attribute contains the number of text rows.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "rows" attribute.  It should
//                     be equal to 10.
//
// Semantic Requirements:9 
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0009TAE()
 {
   var computedValue = "";
   var expectedValue = 10;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0009TAE");
    results.description = "The \"rows\" attribute contains the number of "+
                          "test rows.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.rows;
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0002TAE ----------------------
//
//------------------------ test case HTML-0010TAE -------------------------
//
// Testing feature - The "tabIndex" attribute is an index that represents 
//                   the element's position in the tabbing order.
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "tabIndex" attribute.  It should
//                     be equal to 16.
//
// Semantic Requirements:10 
//
// Last modification date - October 25, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0010TAE()
 {
   var computedValue = "";
   var expectedValue = 16;
   var results = "";
   var testNode = "";

    results = new testResults("HTML0010TAE");
    results.description = "The \"tabIndex\" attribute is an index that "+
                          "represents the element's position in the "+
                          "tabbing order.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.tabIndex;
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTMl-0010TAE ----------------------
//
//------------------------ test case HTML-0011TAE -------------------------
//
// Testing feature - The "type" attribute is the string "textarea".
//
// Testing approach -  Retrieve the first TEXTAREA element of the testing
//                     document and examine its "type" attribute.  It should
//                     be equal to "textarea".
//
// Semantic Requirements: 11
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0011TAE()
 {
   var computedValue = "";
   var expectedValue = "TEXTAREA"
   var results = "";
   var testNode = "";

    results = new testResults("HTML0011TAE");
    results.description = "The \"type\" attribute is the string \"textarea\".";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// and access attribute.
//
      computedValue = testNode.node.type;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0011TAE ----------------------
//
//------------------------ test case HTML-0012TAE -------------------------
//
// Testing feature - The "value" attribute is the current contents of the
//                   corresponding form control in an interactive user-agent.
//
// Testing approach -  Retrieve the second TEXTAREA element of the testing
//                     document and examine its "value" attribute.  It
//                     should be equal to the string "ENTER JOD DUTIES".
//
// Semantic Requirements: 12
//
// Last modification date - October 15, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0012TAE()
 {
   var computedValue = "";
   var expectedValue = "ENTER JOB DUTIES";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0012TAE");
    results.description = "The \"value\" attribute is the current contents "+
                          "of the form control in an interactive user-agent.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,THIRD);
//
// and access attribute.
//
      computedValue = testNode.node.value;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0012TAE ----------------------
//
//------------------------ test case HTML-0013TAE -------------------------
//
// Testing feature - The "blur()" method removes keyboard focus from this
//                   element.
//
// Testing approach - Retrieve the first TEXTAREA element from the testing
//                    document and invoke its "blur()" method.  Upon
//                    invocation of this method, the element should become
//                    "blurred".  This should trigger an "onblur" event that
//                    will invoke the "setIdBlur()" function which changes the
//                    element's id attribute to "newId_Blur".  Before the 
//                    "blur()" method is invoked, the element is given focus by
//                    invoking its "focus()" method.
//
// Semantic Requirements: 13
//
// Last modification date - October 19, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0013TAE()
 {
   var computedValue = "";
   var expectedValue = "NEWID_BLUR";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0013TAE");
    results.description = "The \"blur()\" method removes keyboard focus from "+
                          "this element.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// Invoke its "blur()" method.
//
      testNode.node.focus();
      testNode.node.blur();
      computedValue = testNode.node.id; 
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
//      resetHTMLData();
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0013TAE ----------------------
//
//------------------------ test case HTML-0014TAE -------------------------
//
// Testing feature - The "focus()" method gives keyboard focus to this 
//                   element.
//
// Testing approach - Retrieve the first TEXTAREA element from the testing
//                    document and invoke its "focus()" method.  upon this
//                    method being invoked, focus should be given to
//                    this element.  This should trigger an "onfocus" event
//                    that will invoke the "setDir()" function which changes the
//                    element's dir attribute to to "RTL". 
//
// Semantic Requirements: 14
//
// Last modification date - October 19, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0014TAE()
 {
   var computedValue = "";
   var expectedValue = "RTL";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0014TAE");
    results.description = "The\"focus()\" method gives keyboard focus to this "+
                          "element.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// Invoke its "focus" method.
//
      testNode.node.focus();
      computedValue = testNode.node.dir;
      computedValue = computedValue.toUpperCase(); 
//
// Write out results
//
      resetHTMLData();
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0014TAE ----------------------
//
//------------------------ test case HTML-0015TAE -------------------------
//
// Testing feature - The "select()" method selects the content of the 
//                   TEXTAREA.
//
// Testing approach - Retrieve the first SELECT element from the testing
//                    document and invoke its "select()" method.  upon this
//                    method being invoked, the contents of the text area 
//                    should be selected.  This should trigger an "onselect" 
//                    event that will invoke the "newTitle()" function which 
//                    changes the element's title attribute to "new_title".
//
// Semantic Requirements: 15
//
// Last modification date - October 19, 1999
//
// Written by: Mark LaRoy Zimmerman
//----------------------------------------------------------------------------
function HTML0015TAE()
 {
   var computedValue = "";
   var expectedValue = "NEW_TITLE";
   var results = "";
   var testNode = "";

    results = new testResults("HTML0015TAE");
    results.description = "The \"select()\" method selects the content of "+
                          "the TEXTAREA.";
//
// Retrieve targeted data.
//
      testNode = new HTMLNodeObject(TEXTAREA,FIRST);
//
// Invoke its select() method.
//
      testNode.node.select();
      computedValue = testNode.node.title;
      computedValue = computedValue.toUpperCase();
//
// Write out results
//
      resetHTMLData();
      results.expected = expectedValue;
      results.actual = computedValue;

    return results;
}
//----------------------- end test case HTML-0015TAE ----------------------