|
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 header information cells for XUL listbox"> |
|
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="../table.js"></script> |
|
16 |
|
17 <script type="application/javascript"> |
|
18 <![CDATA[ |
|
19 function doTest() |
|
20 { |
|
21 ////////////////////////////////////////////////////////////////////////// |
|
22 // XUL listbox |
|
23 |
|
24 var headerInfoMap = [ |
|
25 { |
|
26 cell: "lb1_cell0", |
|
27 rowHeaderCells: [], |
|
28 columnHeaderCells: [ "lb1_header1" ] |
|
29 }, |
|
30 { |
|
31 cell: "lb1_cell1", |
|
32 rowHeaderCells: [], |
|
33 columnHeaderCells: [ "lb1_header2" ] |
|
34 }, |
|
35 { |
|
36 cell: "lb1_cell2", |
|
37 rowHeaderCells: [], |
|
38 columnHeaderCells: [ "lb1_header3" ] |
|
39 }, |
|
40 { |
|
41 cell: "lb1_cell3", |
|
42 rowHeaderCells: [], |
|
43 columnHeaderCells: [ "lb1_header1" ] |
|
44 }, |
|
45 { |
|
46 cell: "lb1_cell4", |
|
47 rowHeaderCells: [], |
|
48 columnHeaderCells: [ "lb1_header2" ] |
|
49 }, |
|
50 { |
|
51 cell: "lb1_cell5", |
|
52 rowHeaderCells: [], |
|
53 columnHeaderCells: [ "lb1_header3" ] |
|
54 }, |
|
55 ]; |
|
56 |
|
57 testHeaderCells(headerInfoMap); |
|
58 |
|
59 ////////////////////////////////////////////////////////////////////////// |
|
60 // XUL listbox with ARIA |
|
61 |
|
62 headerInfoMap = [ |
|
63 { |
|
64 cell: "lb2_cell0", |
|
65 rowHeaderCells: [], |
|
66 columnHeaderCells: [] |
|
67 }, |
|
68 { |
|
69 cell: "lb2_cell1", |
|
70 rowHeaderCells: [], |
|
71 columnHeaderCells: [] |
|
72 }, |
|
73 { |
|
74 cell: "lb2_cell2", |
|
75 rowHeaderCells: [], |
|
76 columnHeaderCells: [] |
|
77 }, |
|
78 { |
|
79 cell: "lb2_cell3", |
|
80 rowHeaderCells: [], |
|
81 columnHeaderCells: [ "lb2_cell0" ] |
|
82 }, |
|
83 { |
|
84 cell: "lb2_cell4", |
|
85 rowHeaderCells: [ "lb2_cell3" ], |
|
86 columnHeaderCells: [ "lb2_cell1" ] |
|
87 }, |
|
88 { |
|
89 cell: "lb2_cell5", |
|
90 rowHeaderCells: [ "lb2_cell3" ], |
|
91 columnHeaderCells: [ "lb2_cell2" ] |
|
92 }, |
|
93 { |
|
94 cell: "lb2_cell6", |
|
95 rowHeaderCells: [], |
|
96 columnHeaderCells: [ "lb2_cell0" ] |
|
97 }, |
|
98 { |
|
99 cell: "lb2_cell7", |
|
100 rowHeaderCells: [ "lb2_cell6" ], |
|
101 columnHeaderCells: [ "lb2_cell1" ] |
|
102 }, |
|
103 { |
|
104 cell: "lb2_cell8", |
|
105 rowHeaderCells: [ "lb2_cell6" ], |
|
106 columnHeaderCells: [ "lb2_cell2" ] |
|
107 } |
|
108 ]; |
|
109 |
|
110 testHeaderCells(headerInfoMap); |
|
111 |
|
112 SimpleTest.finish(); |
|
113 } |
|
114 |
|
115 SimpleTest.waitForExplicitFinish(); |
|
116 addA11yLoadEvent(doTest); |
|
117 ]]> |
|
118 </script> |
|
119 |
|
120 <hbox style="overflow: auto;"> |
|
121 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
122 <a target="_blank" |
|
123 href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424" |
|
124 title="implement IAccessibleTable2"> |
|
125 Mozilla Bug 512424 |
|
126 </a> |
|
127 |
|
128 <p id="display"></p> |
|
129 <div id="content" style="display: none"> |
|
130 </div> |
|
131 <pre id="test"> |
|
132 </pre> |
|
133 </body> |
|
134 |
|
135 <vbox flex="1"> |
|
136 |
|
137 <label control="listbox" value="multicolumn listbox with header"/> |
|
138 <listbox id="listbox"> |
|
139 <listhead> |
|
140 <listheader id="lb1_header1" label="header1"/> |
|
141 <listheader id="lb1_header2" label="header2"/> |
|
142 <listheader id="lb1_header3" label="header3"/> |
|
143 </listhead> |
|
144 <listcols> |
|
145 <listcol flex="1"/> |
|
146 <listcol flex="1"/> |
|
147 <listcol flex="1"/> |
|
148 </listcols> |
|
149 <listitem> |
|
150 <listcell id="lb1_cell0" label="cell0"/> |
|
151 <listcell id="lb1_cell1" label="cell1"/> |
|
152 <listcell id="lb1_cell2" label="cell2"/> |
|
153 </listitem> |
|
154 <listitem> |
|
155 <listcell id="lb1_cell3" label="cell3"/> |
|
156 <listcell id="lb1_cell4" label="cell4"/> |
|
157 <listcell id="lb1_cell5" label="cell5"/> |
|
158 </listitem> |
|
159 <listitem> |
|
160 <listcell id="lb1_cell6" label="cell6"/> |
|
161 <listcell id="lb1_cell7" label="cell7"/> |
|
162 <listcell id="lb1_cell8" label="cell8"/> |
|
163 </listitem> |
|
164 </listbox> |
|
165 |
|
166 <label control="listbox2" value="multicolumn listbox with ARIA headers"/> |
|
167 <listbox id="listbox2"> |
|
168 <listcols> |
|
169 <listcol flex="1"/> |
|
170 <listcol flex="1"/> |
|
171 <listcol flex="1"/> |
|
172 </listcols> |
|
173 <listitem> |
|
174 <listcell role="columnheader" id="lb2_cell0" label="cell0"/> |
|
175 <listcell role="columnheader" id="lb2_cell1" label="cell1"/> |
|
176 <listcell role="columnheader" id="lb2_cell2" label="cell2"/> |
|
177 </listitem> |
|
178 <listitem> |
|
179 <listcell role="rowheader" id="lb2_cell3" label="cell3"/> |
|
180 <listcell id="lb2_cell4" label="cell4"/> |
|
181 <listcell id="lb2_cell5" label="cell5"/> |
|
182 </listitem> |
|
183 <listitem> |
|
184 <listcell role="rowheader" id="lb2_cell6" label="cell6"/> |
|
185 <listcell id="lb2_cell7" label="cell7"/> |
|
186 <listcell id="lb2_cell8" label="cell8"/> |
|
187 </listitem> |
|
188 </listbox> |
|
189 |
|
190 </vbox> |
|
191 </hbox> |
|
192 |
|
193 </window> |
|
194 |