|
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="Table accessible tree and table interface tests for XUL listboxes"> |
|
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 <script type="application/javascript" |
|
17 src="../table.js"></script> |
|
18 |
|
19 <script type="application/javascript"> |
|
20 <![CDATA[ |
|
21 function doTest() |
|
22 { |
|
23 ////////////////////////////////////////////////////////////////////////// |
|
24 // Multicolumn listbox. |
|
25 |
|
26 var cellsArray = [ |
|
27 [kDataCell, kDataCell], |
|
28 [kDataCell, kDataCell] |
|
29 ]; |
|
30 |
|
31 testTableStruct("listbox1", cellsArray); |
|
32 |
|
33 ////////////////////////////////////////////////////////////////////////// |
|
34 // Multicolumn listbox with header. |
|
35 |
|
36 var cellsArray = [ |
|
37 [kDataCell, kDataCell, kDataCell], |
|
38 [kDataCell, kDataCell, kDataCell], |
|
39 [kDataCell, kDataCell, kDataCell] |
|
40 ]; |
|
41 |
|
42 testTableStruct("listbox2", cellsArray, kListboxColumnHeader); |
|
43 |
|
44 SimpleTest.finish(); |
|
45 } |
|
46 |
|
47 SimpleTest.waitForExplicitFinish(); |
|
48 addA11yLoadEvent(doTest); |
|
49 ]]> |
|
50 </script> |
|
51 |
|
52 <hbox 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=512424" |
|
56 title="implement IAccessibleTable2"> |
|
57 Mozilla Bug 512424 |
|
58 </a> |
|
59 |
|
60 <p id="display"></p> |
|
61 <div id="content" style="display: none"> |
|
62 </div> |
|
63 <pre id="test"> |
|
64 </pre> |
|
65 </body> |
|
66 |
|
67 <vbox flex="1"> |
|
68 |
|
69 <label control="listbox1" value="multicolumn listbox: "/> |
|
70 <listbox id="listbox1"> |
|
71 <listcols> |
|
72 <listcol flex="1"/> |
|
73 <listcol flex="1"/> |
|
74 </listcols> |
|
75 <listitem> |
|
76 <listcell label="cell1"/> |
|
77 <listcell label="cell2"/> |
|
78 </listitem> |
|
79 <listitem> |
|
80 <listcell label="cell1"/> |
|
81 <listcell label="cell2"/> |
|
82 </listitem> |
|
83 </listbox> |
|
84 |
|
85 <label control="listbox2" value="multicolumn listbox with header"/> |
|
86 <listbox id="listbox2"> |
|
87 <listhead> |
|
88 <listheader label="header1"/> |
|
89 <listheader label="header2"/> |
|
90 <listheader label="header3"/> |
|
91 </listhead> |
|
92 <listcols> |
|
93 <listcol flex="1"/> |
|
94 <listcol flex="1"/> |
|
95 <listcol flex="1"/> |
|
96 </listcols> |
|
97 <listitem> |
|
98 <listcell label="cell0"/> |
|
99 <listcell label="cell1"/> |
|
100 <listcell label="cell2"/> |
|
101 </listitem> |
|
102 <listitem> |
|
103 <listcell label="cell3"/> |
|
104 <listcell label="cell4"/> |
|
105 <listcell label="cell5"/> |
|
106 </listitem> |
|
107 <listitem> |
|
108 <listcell label="cell6"/> |
|
109 <listcell label="cell7"/> |
|
110 <listcell label="cell8"/> |
|
111 </listitem> |
|
112 </listbox> |
|
113 </vbox> |
|
114 </hbox> |
|
115 |
|
116 </window> |
|
117 |