|
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="XUL listbox element test."> |
|
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"></script> |
|
14 <script type="application/javascript" |
|
15 src="../role.js"></script> |
|
16 |
|
17 <script type="application/javascript"> |
|
18 <![CDATA[ |
|
19 function doTest() |
|
20 { |
|
21 var id = ""; |
|
22 var listbox = null, acc = null; |
|
23 |
|
24 ////////////////////////////////////////////////////////////////////////// |
|
25 // Simple listbox. There is no nsIAccessibleTable interface. |
|
26 |
|
27 id = "listbox1"; |
|
28 acc = getAccessible(id); |
|
29 |
|
30 // query nsIAccessibleTable |
|
31 try { |
|
32 acc.QueryInterface(nsIAccessibleTable); |
|
33 ok(false, |
|
34 id + " shouldn't implement nsIAccessibleTable interface."); |
|
35 } catch(e) { |
|
36 ok(true, id + " doesn't implement nsIAccessibleTable interface."); |
|
37 } |
|
38 |
|
39 // role |
|
40 testRole(id, ROLE_LISTBOX); |
|
41 |
|
42 SimpleTest.finish(); |
|
43 } |
|
44 |
|
45 SimpleTest.waitForExplicitFinish(); |
|
46 addA11yLoadEvent(doTest); |
|
47 ]]> |
|
48 </script> |
|
49 |
|
50 <hbox style="overflow: auto;"> |
|
51 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
52 <a target="_blank" |
|
53 href="https://bugzilla.mozilla.org/show_bug.cgi?id=418371" |
|
54 title="implement the rest of methods of nsIAccessibleTable on xul:listbox"> |
|
55 Mozilla Bug 418371 |
|
56 </a> |
|
57 <p id="display"></p> |
|
58 <div id="content" style="display: none"> |
|
59 </div> |
|
60 <pre id="test"> |
|
61 </pre> |
|
62 </body> |
|
63 |
|
64 <vbox flex="1"> |
|
65 <label control="listbox1" value="listbox: "/> |
|
66 <listbox id="listbox1"> |
|
67 <listitem label="item1" id="item1"/> |
|
68 <listitem label="item2" id="item2"/> |
|
69 </listbox> |
|
70 </vbox> |
|
71 </hbox> |
|
72 |
|
73 </window> |
|
74 |