2
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
3
for XUL TABBOX TABPANELS Node
4
Author: dsirnapalli@netscape.com
8
- The contents of this file are subject to the Mozilla Public
9
- License Version 1.1 (the "License"); you may not use this file
10
- except in compliance with the License. You may obtain a copy of
11
- the License at http://www.mozilla.org/MPL/
13
- Software distributed under the License is distributed on an "AS
14
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
15
- implied. See the License for the specific language governing
16
- rights and limitations under the License.
18
- The Original Code is Mozilla Communicator Test Cases.
20
- The Initial Developer of the Original Code is Netscape Communications
21
- Corp. Portions created by Netscape Communications Corp. are
22
- Copyright (C) 1999 Netscape Communications Corp. All
28
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
31
title="XUL Tabbox Tabpanels"
33
xmlns:html="http://www.w3.org/1999/xhtml"
34
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
36
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
37
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
42
function getDomNodeTabboxTabpanels()
45
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
46
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
48
var node = document.getElementsByTagName("tabpanels").item(0);
52
alert("Exception: " + e);
56
function executeTestCase()
58
var domNode = getDomNodeTabboxTabpanels();
59
accNode = getAccessibleNode(domNode);
60
setTimeout("constructResults();", 2000);
63
function constructResults()
66
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
67
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
70
var newname = name.toString();
72
var state = getState();
73
var value = getValue();
74
var newvalue = value.toString();
75
var keyboardShortcut = getAccKeyboardShortcut();
77
var expectedName = "NS_ERROR_NOT_IMPLEMENTED";
78
var expectedRole = "38";
79
var expectedState = "0";
80
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
81
var expectedkeyboardShortcut = "Alt+p";
83
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
84
var row1 = new Array("Name->", expectedName, newname);
85
var row2 = new Array("Role->", expectedRole, role);
86
var row3 = new Array("State->", expectedState, state);
87
var row4 = new Array("Value->", expectedValue, value);
88
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
90
row = new Array(row0, row1, row2, row3, row4, row5);
92
if (newname.match(expectedName)) row1[3] = "PASS"; else row1[3] = "FAIL";
93
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
94
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
95
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
96
if (keyboardShortcut == expectedkeyboardShortcut)
97
row5[3] = "PASS"; else row5[3] = "FAIL";
103
alert("Exception**: " + e);
110
<box orient="vertical" flex="1">
112
<html:b> Testing XUL Tabbox's Tabpanels for Accessibility.. </html:b>
114
<box oreint="horizontal">
120
<tabpanels accesskey="p">
121
<tabpanel id="mailtab">
122
<checkbox label="Automatically check for mail"/>
124
<tabpanel id="newstab">
125
<button label="Clear News Buffer"/>
135
res = "<b><u> Results for XUL Tabbox's Tabpanels Node:</u></b><br><br>";
137
setTimeout("executeTestCase();", 2000);
b'\\ No newline at end of file'