*** empty log message ***

This commit is contained in:
dsirnapalli%netscape.com 2002-01-25 01:11:03 +00:00
parent 9f79cf477e
commit d688973a40
7 changed files with 268 additions and 100 deletions

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Caption Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.18.01.
Last Run On:01.03.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Caption Text Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.18.01.
Last Run On: 01.07.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Cell Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.18.01.
Last Run On:01.07.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Cell Text Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.18.01.
Last Run On:01.03.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.17.01.
Last Run On:01.24.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file
@ -52,70 +52,149 @@ function getDomNodeTable()
function executeTestCase()
{
var domNode = getDomNodeTable();
if(domNode == null)
{
res = res + "Could not get the DOM Node";
submitToCookie();
}
else
{ //else1
var accNode = getAccessibleNode(domNode);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
if(accNode == "Exception")
{
res = res + "The Node you selected is not an Accessible Node";
submitToCookie();
}
else
{ //else2
try{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var col1 = new Array("Property", "Name->", "Role->", "State->", "Value->");
var col2 = new Array("Values", name, role, state, value);
var col3 = new Array("Result");
if (name == "Test Table") col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "24") col3[2] = "PASS"; else col3[2] = "FAIL";
if (state == "0") col3[3] = "PASS"; else col3[3] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
col3[4] = "PASS"; else col3[4] = "FAIL";
res += "<table border cols=2 width='75%'>";
for(i=0; i<=4; i++)
{
res += "<tr>";
res += " <td width='20%'><b>" + col1[i] + "</b></td>";
if(i==0)
res += " <td width='70%'><b>" + col2[i] + "</b></td>";
else
res += " <td>" + col2[i] + "</td>";
if (i==0)
res += " <td><b>" + col3[i] + "</b></td>";
else
{
if (col3[i] == "FAIL")
res += " <td bgcolor='#FF0000' width='10%'>" + col3[i] + "</td>";
else
res += " <td>" + col3[i] + "</td>";
}
res += "</tr>";
}
res += "</table>";
}
catch(e){
alert("Exception**: " + e);
}
accNode.accTakeFocus();
setTimeout("constructResults();", 2000);
}
catch(e){
alert("Exception**: " + e);
}
}//else2
}//else1
} //else1
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = true;
}
else
{
varaccFocused = false;
}
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
// if (focused == true) focus = "Focused"; else focus = "Not Focused";
if (varaccFocused == true) tookfocus = "Focused"; else tookfocus = "Not Focused";
var row0 = new Array("Property", "Values", "Result");
var row1 = new Array("Name->", name);
var row2 = new Array("Role->", role);
var row3 = new Array("State->", state);
var row4 = new Array("Value->", value);
// var row5 = new Array("accTakeFocus->", focus);
var row6 = new Array("accFocused->", tookfocus);
if (name == "Test Table") row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "24") row2[2] = "PASS"; else row2[2] = "FAIL";
if (state == "0") row3[2] = "PASS"; else row3[2] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
row4[2] = "PASS"; else row4[2] = "FAIL";
// if (focus == "Focused") row5[2] = "PASS"; else row5[2] = "FAIL";
// if there is focus on table, that means its failed. Table is not focusable.
if (tookfocus == "Focused") row6[2] = "FAIL"; else row6[2] = "PASS";
res += "<table border cols=3 width='70%'>";
res += "<tr>";
for(col=0; col<3; col++)
res += "<td><b>" + row0[col] + "</b></td>";
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row1[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row1[col] + "</td>";
else
res += "<td>" + row1[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row2[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row2[col] + "</td>";
else
res += "<td>" + row2[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row3[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row3[col] + "</td>";
else
res += "<td>" + row3[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row4[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row4[col] + "</td>";
else
res += "<td>" + row4[col] + "</td>";
}
res += "</tr>";
// res += "<tr>";
// for(col=0; col<3; col++)
// {
// if(row5[col] == "FAIL")
// res += "<td bgcolor='#FF0000'>" + row5[col] + "</td>";
// else
// res += "<td>" + row5[col] + "</td>";
// }
// res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row6[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row6[col] + "</td>";
else
res += "<td>" + row6[col] + "</td>";
}
res += "</tr>";
res += "</table>";
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
function submitToCookie()
{
createCookie("nsIAccessibleTestTableNode", res, 14);
setTimeout("window.location.reload();", 2000);
}

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table Row Node
Author: dsirnapalli@netscape.com
Revs: 11.20.01 - Created
Last Run On:12.18.01.
Last Run On:01.07.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file

View File

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Text Area Node
Author: dsirnapalli@netscape.com
Revs: 11.26.01 - Created
Last Run On:12.18.01.
Last Run On:01.23.02.
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file
@ -52,73 +52,161 @@ function getDomNodeTextArea()
function executeTestCase()
{
var domNode = getDomNodeTextArea();
if(domNode == null)
{
res = res + "Could not get the DOM Node";
submitToCookie();
}
else
{ //else1
var accNode = getAccessibleNode(domNode);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
if(accNode == "Exception")
{
res = res + "The Node you selected is not an Accessible Node";
submitToCookie();
}
else
{ //else2
try{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var col1 = new Array("Property", "Name->", "Role->", "State->", "Value->");
var col2 = new Array("Values", name, role, state, value);
var col3 = new Array("Result");
if (name == null) col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "42") col3[2] = "PASS"; else col3[2] = "FAIL";
if (state == "1048576") col3[3] = "PASS"; else col3[3] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
col3[4] = "PASS"; else col3[4] = "FAIL";
res += "<table border cols=2 width='75%'>";
for(i=0; i<=4; i++)
{
res += "<tr>";
res += " <td width='20%'><b>" + col1[i] + "</b></td>";
if(i==0)
res += " <td width='70%'><b>" + col2[i] + "</b></td>";
else
res += " <td>" + col2[i] + "</td>";
if (i==0)
res += " <td><b>" + col3[i] + "</b></td>";
else
{
if (col3[i] == "FAIL")
res += " <td bgcolor='#FF0000' width='10%'>" + col3[i] + "</td>";
else
res += " <td>" + col3[i] + "</td>";
}
res += "</tr>";
}
res += "</table>";
}
catch(e){
alert("Exception**: " + e);
}
accNode.accTakeFocus();
setTimeout("constructResults();", 2000);
}
catch(e){
alert("Exception**: " + e);
}
}//else2
}//else1
} //else1
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
// here we are comparing two node using accGetDOMNode() function because,
// you cant use == to compare two nodes. may be we could override == operator,
// we dont keep entire tree in memory, because that would cause bloat. when we
// need to give someone nsIAccessible we create a new one each time, but we dont
// keep trace of it, so there may be several nsIAccessible's at the same time
// in memory all representing the same part of the doc. however you can compare
// the two objs by checking their dom nodes. For users of IAccessible who dont
// have accGetDOMNode(), they can compare the unique ID value, which is
// essentially the numerical value of the dom node ptr.
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = true;
}
else
{
varaccFocused = false;
}
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
if (focused == true) focus = "Focused"; else focus = "Not Focused";
if (varaccFocused == true) tookfocus = "Focused"; else tookfocus = "Not Focused";
var row0 = new Array("Property", "Values", "Result");
var row1 = new Array("Name->", name);
var row2 = new Array("Role->", role);
var row3 = new Array("State->", state);
var row4 = new Array("Value->", value);
var row5 = new Array("accTakeFocus->", focus);
var row6 = new Array("accFocused->", tookfocus);
if (name == null) row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "42") row2[2] = "PASS"; else row2[2] = "FAIL";
if (state == "1048580") row3[2] = "PASS"; else row3[2] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
row4[2] = "PASS"; else row4[2] = "FAIL";
if (focus == "Focused") row5[2] = "PASS"; else row5[2] = "FAIL";
if (tookfocus == "Focused") row6[2] = "PASS"; else row6[2] = "FAIL";
res += "<table border cols=3 width='70%'>";
res += "<tr>";
for(col=0; col<3; col++)
res += "<td><b>" + row0[col] + "</b></td>";
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row1[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row1[col] + "</td>";
else
res += "<td>" + row1[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row2[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row2[col] + "</td>";
else
res += "<td>" + row2[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row3[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row3[col] + "</td>";
else
res += "<td>" + row3[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row4[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row4[col] + "</td>";
else
res += "<td>" + row4[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row5[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row5[col] + "</td>";
else
res += "<td>" + row5[col] + "</td>";
}
res += "</tr>";
res += "<tr>";
for(col=0; col<3; col++)
{
if(row6[col] == "FAIL")
res += "<td bgcolor='#FF0000'>" + row6[col] + "</td>";
else
res += "<td>" + row6[col] + "</td>";
}
res += "</tr>";
res += "</table>";
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
function submitToCookie()
{
createCookie("nsIAccessibleTestTextAreaNode", res, 14);
setTimeout("window.location.reload();", 2000);
}
</script>
</head>
@ -134,12 +222,13 @@ document.write('<input name="resultsfile" type="hidden" value="' + window.opener
<script type="text/javascript">
focused = false;
var res = "<b><u> Results for HTML Text Area Node:</u></b><br><br>";
if(readCookie("nsIAccessibleTestTextAreaNode") == null)
{
<!-- Test Text Area -->
document.write('<b> Testing Text Area </b><br><br>');
document.write('<textarea name="Comment Box" cols="40" rows="8">');
document.write('<textarea name="Comment Box" cols="40" rows="8" onFocus="focused=true">');
document.write('Default text..');
document.write('</textarea>');