mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
nsIAccessibleTestTable.txt is replaced by other test cases.
This commit is contained in:
parent
e0b30fe3a4
commit
4c4017ab87
@ -1,221 +0,0 @@
|
||||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html>
|
||||
<title> nsIAccessible Interface Test Case </title>
|
||||
<!-- Descrpt: Test nsIAccessible Interface methods for HTML Table
|
||||
Author: dsirnapalli@netscape.com
|
||||
Revs: 11.20.01 - Created
|
||||
Last Run On:11.30.01.
|
||||
|
||||
- The contents of this file are subject to the Mozilla Public
|
||||
- License Version 1.1 (the "License"); you may not use this file
|
||||
- except in compliance with the License. You may obtain a copy of
|
||||
- the License at http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS
|
||||
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
- implied. See the License for the specific language governing
|
||||
- rights and limitations under the License.
|
||||
-
|
||||
- The Original Code is Mozilla Communicator Test Cases.
|
||||
-
|
||||
- The Initial Developer of the Original Code is Netscape Communications
|
||||
- Corp. Portions created by Netscape Communications Corp. are
|
||||
- Copyright (C) 1999 Netscape Communications Corp. All
|
||||
- Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-->
|
||||
<head>
|
||||
|
||||
<!-- script below is ngdriverspecific -->
|
||||
<script type="text/javascript" src="http://bubblegum/ngdriver/suites/testlib.js">
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="accessibility.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function getDomNodeTable()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("table").item(0);
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function getDomNodeTableRow()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("tr").item(0);
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function getDomNodeTableCell()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("td").item(0);
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function getDomNodeTableCellText()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("td").item(0);
|
||||
node = node.firstChild;
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function getDomNodeTableCaptionText()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("table").item(0);
|
||||
node = node.firstChild.firstChild;
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function getDomNodeTableCaption()
|
||||
{
|
||||
try{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var node = document.getElementsByTagName("table").item(0);
|
||||
node = node.firstChild;
|
||||
return node;
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function executeTestCase()
|
||||
{
|
||||
//var domNode = getDomNodeTable();
|
||||
//var domNode = getDomNodeTableRow();
|
||||
//var domNode = getDomNodeTableCell();
|
||||
//var domNode = getDomNodeTableCellText();
|
||||
//var domNode = getDomNodeTableCaptionText();
|
||||
var domNode = getDomNodeTableCaption();
|
||||
|
||||
if(domNode == null)
|
||||
{
|
||||
res = res + "Could not get the DOM Node";
|
||||
}
|
||||
else
|
||||
{ //else1
|
||||
var accNode = getAccessibleNode(domNode);
|
||||
|
||||
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");
|
||||
|
||||
var name = getName(accNode);
|
||||
res += "<b>Name:</b> " + name + "<br>";
|
||||
|
||||
var role = getRole(accNode);
|
||||
res += "<b>Role:</b>" + role + "<br>";
|
||||
|
||||
var state = getState(accNode);
|
||||
res += "<b>State:</b> " + state + "<br>";
|
||||
|
||||
var value = getValue(accNode);
|
||||
res += "<b>Value:</b> " + value + "<br>";
|
||||
}
|
||||
catch(e){
|
||||
alert("Exception**: " + e);
|
||||
}
|
||||
}//else2
|
||||
}//else1
|
||||
createCookie("nsIAccessibleTestTable", res, 14);
|
||||
setTimeout("window.location.reload();", 2000);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- form below is ngdriverspecific -->
|
||||
<form name="results" action="/ngdriver/cgi-bin/writeresults.cgi" method="post">
|
||||
<script TYPE="text/javascript">
|
||||
document.write('<input name="resultsfile" type="hidden" value="' + window.opener.document.resultsform.resultsfile.value + '">');
|
||||
</script>
|
||||
<input type="hidden" name="textarea">
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var res = "<b><u> Results:</u></b><br><br>";
|
||||
if(readCookie("nsIAccessibleTestTable") == null)
|
||||
{
|
||||
<!-- Test Table -->
|
||||
document.write('<center>');
|
||||
document.write('<table border cols=2 width="50%">');
|
||||
document.write('<caption>Test Table</caption>');
|
||||
document.write('<tr>');
|
||||
document.write(' <td> Row1,Col1</td>');
|
||||
document.write(' <td> Row1,Col2</td>');
|
||||
document.write('</tr>');
|
||||
document.write('<tr>');
|
||||
document.write(' <td> Row2,Col1</td>');
|
||||
document.write(' <td> Row2,Col2</td>');
|
||||
document.write('</tr>');
|
||||
document.write('<tr>');
|
||||
document.write(' <td> Row3,Col1</td>');
|
||||
document.write(' <td> Row3,Col2</td>');
|
||||
document.write('</tr>');
|
||||
document.write('</table>');
|
||||
document.write('</center>');
|
||||
|
||||
setTimeout("executeTestCase();", 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
var cookieValue = readCookie("nsIAccessibleTestTable");
|
||||
eraseCookie("nsIAccessibleTestTable");
|
||||
displayResults(cookieValue);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user