This commit is contained in:
dsirnapalli%netscape.com 2002-01-25 01:01:19 +00:00
Родитель 4dc34df40a
Коммит 37440f629a
5 изменённых файлов: 439 добавлений и 346 удалений

Просмотреть файл

@ -1,131 +0,0 @@
//********************* Cookie functions **********************************
function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ')
c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name)
{
createCookie(name,"",-1);
}
//********************* End of cookie functions ****************************
//************************ General functions *******************************
function displayResults(results)
{
document.results.textarea.value = results;
if (top.name == "testWindow")
{
fixSubmit();
}
else
{
document.write(document.results.textarea.value);
}
}
//********************* End of General functions ***************************
//************** functions for nsIAccessibleService interface **************
function getAccessibleNode(startNode)
{
var accessibleService = null;
var accessibleNode = null;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accessibleService = Components.classes["@mozilla.org/accessibilityService;1"].createInstance();
accessibleService = accessibleService.QueryInterface(Components.interfaces.nsIAccessibilityService);
}
catch(e){
alert("Error getting accessibility service");
}
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accessibleNode = accessibleService.getAccessibleFor(startNode);
return accessibleNode;
}
catch(e){
return "Exception";
}
}
//************** End of functions for nsIAccessibleService interface ***********
//**************** functions of nsIAccessible Interface ************************
// This function will test the attribute accName.
function getName(accNode)
{
try{
return accNode.accName;
}
catch(e){
return(e);
}
}
// This function will test the attribute accRole.
function getRole(accNode)
{
try{
return accNode.accRole;
}
catch(e){
return(e);
}
}
// This function will test the attribute accState.
function getState(accNode)
{
try{
return accNode.accState;
}
catch(e){
return(e);
}
}
// This function will test the attribute accValue.
function getValue(accNode)
{
try{
return accNode.accValue;
}
catch(e){
return(e);
}
}
//****************** End of functions of nsIAccessible Interface *************

Просмотреть файл

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Anchor Node
Author: dsirnapalli@netscape.com
Revs: 12.13.01 - Created
Last Run On:01.03.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,68 +52,156 @@ function getDomNodeAnchor()
function executeTestCase()
{
var domNode = getDomNodeAnchor();
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 col1 = new Array("Property", "Name->", "Role->", "State->", "Value->");
var col2 = new Array("Values", name, role, state, value);
var col3 = new Array("Result");
if (name == "External Link") col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "30") col3[2] = "PASS"; else col3[2] = "FAIL";
if (state == "7340096") col3[3] = "PASS"; else col3[3] = "FAIL";
if (value == "http://www.yahoo.com")
col3[4] = "PASS"; else col3[4] = "FAIL";
res += "<table border cols=3 width='70%'>";
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);
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 == "External Link") row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "30") row2[2] = "PASS"; else row2[2] = "FAIL";
if (state == "7340100") row3[2] = "PASS"; else row3[2] = "FAIL";
if (value == "http://home.netscape.com")
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("nsIAccessibleTestAnchorNode", res, 14);
setTimeout("window.location.reload();", 2000);
}
@ -132,13 +220,14 @@ document.write('<input name="resultsfile" type="hidden" value="' + window.opener
<script type="text/javascript">
focused = false;
var res = "<b><u> Results for HTML Anchor Node:</u></b><br><br>";
if(readCookie("nsIAccessibleTestAnchorNode") == null)
{
<!-- Test Anchor -->
<!-- Anchor linking to external file -->
document.write('Testing Link' + '<br>');
document.write('<a href="http://www.yahoo.com">External Link</a>');
document.write('<a href="http://home.netscape.com" onFocus="focused=true">External Link</a>');
setTimeout("executeTestCase();", 2000);
}
@ -151,4 +240,5 @@ else
</script>
</body>
</html>
</html>

Просмотреть файл

@ -4,7 +4,7 @@
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Anchor Text Node
Author: dsirnapalli@netscape.com
Revs: 12.13.01 - Created
Last Run On:12.17.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
@ -42,7 +42,6 @@ function getDomNodeAnchorText()
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("a").item(0);
node = node.firstChild;
return node;
}
catch(e){
@ -53,68 +52,97 @@ function getDomNodeAnchorText()
function executeTestCase()
{
var domNode = getDomNodeAnchorText();
if(domNode == null)
{
res = res + "Could not get the DOM Node";
accNode = getAccessibleNode(domNode);
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
domNode = domNode.firstChild;
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
else
{ //else1
var accNode = getAccessibleNode(domNode);
catch(e){
alert("Exception**: " + e);
}
}
if(accNode == "Exception")
{
res = res + "The Node you selected is not an Accessible Node";
}
else
{ //else2
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
function constructResults()
{
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 name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
}
catch(e){
alert("Exception**: " + e);
}
var col1 = new Array("Property", "Name->", "Role->", "State->", "Value->");
var col2 = new Array("Values", name, role, state, value);
var col3 = new Array("Result");
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);
if (name == "External Link") col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "42") col3[2] = "PASS"; else col3[2] = "FAIL";
if (state == "7340096") col3[3] = "PASS"; else col3[3] = "FAIL";
if (value == "http://www.yahoo.com")
col3[4] = "PASS"; else col3[4] = "FAIL";
if (name == "External Link") row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "42") row2[2] = "PASS"; else row2[2] = "FAIL";
if (state == "7340100") row3[2] = "PASS"; else row3[2] = "FAIL";
if (value == "http://home.netscape.com")
row4[2] = "PASS"; else row4[2] = "FAIL";
res += "<table border cols=2 width='50%'>";
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 += "</table>";
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);
}
}//else2
}//else1
submitToCookie();
}
function submitToCookie()
{
createCookie("nsIAccessibleTestAnchorTextNode", res, 14);
setTimeout("window.location.reload();", 2000);
}
@ -139,7 +167,7 @@ if(readCookie("nsIAccessibleTestAnchorTextNode") == null)
<!-- Test Anchor -->
<!-- Anchor linking to external file -->
document.write('Testing Link' + '<br>');
document.write('<a href="http://www.yahoo.com">External Link</a>');
document.write('<a href="http://home.netscape.com">External Link</a>');
setTimeout("executeTestCase();", 2000);
}

Просмотреть файл

@ -1,10 +1,10 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Button
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Button Node
Author: dsirnapalli@netscape.com
Revs: 01.08.02 - Created
Last Run On:01.08.02.
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,70 +52,148 @@ function getDomNodeButton()
function executeTestCase()
{
var domNode = getDomNodeButton();
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{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
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 == "Submit") col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "43") 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");
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 == "Submit") row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "43") 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("nsIAccessibleTestButtonNode", res, 14);
setTimeout("window.location.reload();", 2000);
}
@ -134,6 +212,7 @@ document.write('<input name="resultsfile" type="hidden" value="' + window.opener
<script type="text/javascript">
focused = false;
var res = "<b><u> Results for HTML Button Node:</u></b><br><br>";
if(readCookie("nsIAccessibleTestButtonNode") == null)
{
@ -141,7 +220,7 @@ if(readCookie("nsIAccessibleTestButtonNode") == null)
document.write('<br>');
document.write('Testing Button..<br><br>');
document.write('<button value="submit"> Submit </button>');
document.write('<button value="submit" onFocus="focused=true"> Submit </button>');
setTimeout("executeTestCase();", 2000);
}

Просмотреть файл

@ -1,10 +1,10 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Button Text
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Button Text Node
Author: dsirnapalli@netscape.com
Revs: 01.08.02 - Created
Last Run On:01.08.02.
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
@ -42,7 +42,6 @@ function getDomNodeButtonText()
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("button").item(0);
node = node.firstChild;
return node;
}
catch(e){
@ -53,70 +52,98 @@ function getDomNodeButtonText()
function executeTestCase()
{
var domNode = getDomNodeButtonText();
if(domNode == null)
{
res = res + "Could not get the DOM Node";
accNode = getAccessibleNode(domNode);
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
domNode = domNode.firstChild;
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
else
{ //else1
var accNode = getAccessibleNode(domNode);
catch(e){
alert("Exception**: " + e);
}
}
if(accNode == "Exception")
{
res = res + "The Node you selected is not an Accessible Node";
}
else
{ //else2
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
function constructResults()
{
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 name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
}
catch(e){
alert("Exception**: " + e);
}
var col1 = new Array("Property", "Name->", "Role->", "State->", "Value->");
var col2 = new Array("Values", name, role, state, value);
var col3 = new Array("Result");
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);
if (name == " Submit ") col3[1] = "PASS"; else col3[1] = "FAIL";
if (role == "42") col3[2] = "PASS"; else col3[2] = "FAIL";
if (state == "2097216") col3[3] = "PASS"; else col3[3] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
col3[4] = "PASS"; else col3[4] = "FAIL";
alert(col3[4]);
res += "<table border cols=2 width='75%'>";
if (name == " Submit ") row1[2] = "PASS"; else row1[2] = "FAIL";
if (role == "42") row2[2] = "PASS"; else row2[2] = "FAIL";
if (state == "2097216") row3[2] = "PASS"; else row3[2] = "FAIL";
if (newvalue.search("NS_ERROR_NOT_IMPLEMENTED"))
row4[2] = "PASS"; else row4[2] = "FAIL";
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>";
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 += "</table>";
}
catch(e){
alert("Exception**: " + e);
}
}//else2
}//else1
submitToCookie();
}
function submitToCookie()
{
createCookie("nsIAccessibleTestButtonNodeText", res, 14);
setTimeout("window.location.reload();", 2000);
}
@ -135,7 +162,7 @@ document.write('<input name="resultsfile" type="hidden" value="' + window.opener
<script type="text/javascript">
var res = "<b><u> Results for HTML Button Node Text:</u></b><br><br>";
var res = "<b><u> Results for HTML Button Text Node:</u></b><br><br>";
if(readCookie("nsIAccessibleTestButtonNodeText") == null)
{
<!-- Test Button -->