accessible/tests/mochitest/tree/test_formctrl.xul

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:759000d65e43
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
4 type="text/css"?>
5
6 <!-- Firefox toolbar -->
7 <?xml-stylesheet href="chrome://browser/content/browser.css"
8 type="text/css"?>
9
10 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
11 title="Accessible XUL checkbox and radio hierarchy tests">
12
13 <!-- Firefox toolbar -->
14 <script type="application/javascript"
15 src="chrome://browser/content/browser.js"/>
16
17 <script type="application/javascript"
18 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
19
20 <script type="application/javascript"
21 src="../common.js" />
22 <script type="application/javascript"
23 src="../role.js" />
24
25 <script type="application/javascript">
26 <![CDATA[
27 ////////////////////////////////////////////////////////////////////////////
28 // Test
29
30 function doTest()
31 {
32 // checkbox
33 var accTree = {
34 role: ROLE_CHECKBUTTON,
35 children: [ ]
36 };
37
38 testAccessibleTree("checkbox", accTree);
39
40 // radiogroup
41 accTree = {
42 role: ROLE_GROUPING,
43 children: [
44 {
45 role: ROLE_RADIOBUTTON,
46 children: [ ]
47 },
48 {
49 role: ROLE_RADIOBUTTON,
50 children: [ ]
51 }
52 ]
53 };
54
55 testAccessibleTree("radiogroup", accTree);
56
57 // toolbar
58 accTree = {
59 role: ROLE_TOOLBAR,
60 name: "My toolbar",
61 children: [
62 {
63 role: ROLE_PUSHBUTTON,
64 name: "hello",
65 children: [ ]
66 }
67 ]
68 };
69
70 testAccessibleTree("toolbar", accTree);
71
72 // toolbar
73 accTree = {
74 role: ROLE_TOOLBAR,
75 name: "My second toolbar",
76 children: [
77 {
78 role: ROLE_PUSHBUTTON,
79 name: "hello",
80 children: [ ]
81 }
82 ]
83 };
84
85 testAccessibleTree("toolbar2", accTree);
86
87 if (!SEAMONKEY)
88 testAccessibleTree("tb_customizable", { TOOLBAR: [] });
89
90 SimpleTest.finish()
91 }
92
93 SimpleTest.waitForExplicitFinish();
94 addA11yLoadEvent(doTest);
95 ]]>
96 </script>
97
98 <hbox flex="1" style="overflow: auto;">
99 <body xmlns="http://www.w3.org/1999/xhtml">
100 <a target="_blank"
101 href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045"
102 title="Fix O(n^2) access to all the children of a container">
103 Mozilla Bug 342045
104 </a><br/>
105 <p id="display"></p>
106 <div id="content" style="display: none">
107 </div>
108 <pre id="test">
109 </pre>
110 </body>
111
112 <vbox flex="1">
113 <checkbox id="checkbox" label="checkbox"/>
114 <radiogroup id="radiogroup">
115 <radio label="radio1"/>
116 <radio label="radio2"/>
117 </radiogroup>
118 <toolbar id="toolbar" toolbarname="My toolbar">
119 <toolbarbutton id="button1" label="hello"/>
120 </toolbar>
121 <toolbar id="toolbar2" toolbarname="2nd" aria-label="My second toolbar">
122 <toolbarbutton id="button2" label="hello"/>
123 </toolbar>
124
125 <toolbar id="tb_customizable" customizable="true"/>
126 </vbox>
127 </hbox>
128
129 </window>
130

mercurial