|
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 Application Accessible 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 // Note: bug 560239 can be tested if this test runs in standalone mode only. |
|
23 |
|
24 var gURL = "../tree/wnd.xul" |
|
25 var gWnd = window.openDialog(gURL, "wnd", "chrome,width=600,height=600"); |
|
26 |
|
27 function doTest() |
|
28 { |
|
29 // Application accessible should contain two root document accessibles, |
|
30 // one is for browser window, another one is for open dialog window. |
|
31 var accTree = { |
|
32 role: ROLE_APP_ROOT, |
|
33 children: [ |
|
34 { |
|
35 role: ROLE_CHROME_WINDOW, |
|
36 name: "Accessibility Chrome Test Harness - Minefield" |
|
37 }, |
|
38 { |
|
39 role: ROLE_CHROME_WINDOW, |
|
40 name: "Empty Window" |
|
41 } |
|
42 ] |
|
43 }; |
|
44 testAccessibleTree(getApplicationAccessible(), accTree); |
|
45 |
|
46 gWnd.close(); |
|
47 |
|
48 SimpleTest.finish() |
|
49 } |
|
50 |
|
51 SimpleTest.waitForExplicitFinish(); |
|
52 |
|
53 // We need to open dialog window before accessibility is started. |
|
54 addLoadEvent(doTest); |
|
55 ]]> |
|
56 </script> |
|
57 |
|
58 <hbox flex="1" style="overflow: auto;"> |
|
59 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
60 <a target="_blank" |
|
61 href="https://bugzilla.mozilla.org/show_bug.cgi?id=560239" |
|
62 title="no children of application accessible for windows open before accessibility was started"> |
|
63 Mozilla Bug 560239 |
|
64 </a><br/> |
|
65 <p id="display"></p> |
|
66 <div id="content" style="display: none"> |
|
67 </div> |
|
68 <pre id="test"> |
|
69 </pre> |
|
70 </body> |
|
71 </hbox> |
|
72 |
|
73 </window> |
|
74 |