|
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 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
7 title="Accessible XUL button hierarchy tests"> |
|
8 |
|
9 <script type="application/javascript" |
|
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
|
11 |
|
12 <script type="application/javascript" |
|
13 src="../common.js" /> |
|
14 <script type="application/javascript" |
|
15 src="../role.js" /> |
|
16 |
|
17 <script type="application/javascript"> |
|
18 <![CDATA[ |
|
19 //////////////////////////////////////////////////////////////////////////// |
|
20 // Test |
|
21 |
|
22 function doTest() |
|
23 { |
|
24 ////////////////////////////////////////////////////////////////////////// |
|
25 // button |
|
26 |
|
27 var accTree = { |
|
28 role: ROLE_PUSHBUTTON, |
|
29 name: "hello", |
|
30 children: [ ] |
|
31 }; |
|
32 testAccessibleTree("button1", accTree); |
|
33 |
|
34 ////////////////////////////////////////////////////////////////////////// |
|
35 // toolbarbutton |
|
36 |
|
37 var accTree = { |
|
38 role: ROLE_PUSHBUTTON, |
|
39 name: "hello", |
|
40 children: [ ] |
|
41 }; |
|
42 testAccessibleTree("button2", accTree); |
|
43 |
|
44 SimpleTest.finish() |
|
45 } |
|
46 |
|
47 SimpleTest.waitForExplicitFinish(); |
|
48 addA11yLoadEvent(doTest); |
|
49 ]]> |
|
50 </script> |
|
51 |
|
52 <hbox flex="1" style="overflow: auto;"> |
|
53 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
54 <a target="_blank" |
|
55 href="https://bugzilla.mozilla.org/show_bug.cgi?id=249292" |
|
56 title="Ensure accessible children for toolbarbutton types 'menu' and 'menu-button'"> |
|
57 Mozilla Bug 249292 |
|
58 </a><br/> |
|
59 <p id="display"></p> |
|
60 <div id="content" style="display: none"> |
|
61 </div> |
|
62 <pre id="test"> |
|
63 </pre> |
|
64 </body> |
|
65 |
|
66 <vbox flex="1"> |
|
67 <button id="button1" label="hello"/> |
|
68 <toolbarbutton id="button2" label="hello"/> |
|
69 </vbox> |
|
70 </hbox> |
|
71 |
|
72 </window> |
|
73 |