1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/table/test_headers_listbox.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,194 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" 1.7 + type="text/css"?> 1.8 + 1.9 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.10 + title="Table header information cells for XUL listbox"> 1.11 + 1.12 + <script type="application/javascript" 1.13 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 1.14 + 1.15 + <script type="application/javascript" 1.16 + src="../common.js"></script> 1.17 + <script type="application/javascript" 1.18 + src="../table.js"></script> 1.19 + 1.20 + <script type="application/javascript"> 1.21 + <![CDATA[ 1.22 + function doTest() 1.23 + { 1.24 + ////////////////////////////////////////////////////////////////////////// 1.25 + // XUL listbox 1.26 + 1.27 + var headerInfoMap = [ 1.28 + { 1.29 + cell: "lb1_cell0", 1.30 + rowHeaderCells: [], 1.31 + columnHeaderCells: [ "lb1_header1" ] 1.32 + }, 1.33 + { 1.34 + cell: "lb1_cell1", 1.35 + rowHeaderCells: [], 1.36 + columnHeaderCells: [ "lb1_header2" ] 1.37 + }, 1.38 + { 1.39 + cell: "lb1_cell2", 1.40 + rowHeaderCells: [], 1.41 + columnHeaderCells: [ "lb1_header3" ] 1.42 + }, 1.43 + { 1.44 + cell: "lb1_cell3", 1.45 + rowHeaderCells: [], 1.46 + columnHeaderCells: [ "lb1_header1" ] 1.47 + }, 1.48 + { 1.49 + cell: "lb1_cell4", 1.50 + rowHeaderCells: [], 1.51 + columnHeaderCells: [ "lb1_header2" ] 1.52 + }, 1.53 + { 1.54 + cell: "lb1_cell5", 1.55 + rowHeaderCells: [], 1.56 + columnHeaderCells: [ "lb1_header3" ] 1.57 + }, 1.58 + ]; 1.59 + 1.60 + testHeaderCells(headerInfoMap); 1.61 + 1.62 + ////////////////////////////////////////////////////////////////////////// 1.63 + // XUL listbox with ARIA 1.64 + 1.65 + headerInfoMap = [ 1.66 + { 1.67 + cell: "lb2_cell0", 1.68 + rowHeaderCells: [], 1.69 + columnHeaderCells: [] 1.70 + }, 1.71 + { 1.72 + cell: "lb2_cell1", 1.73 + rowHeaderCells: [], 1.74 + columnHeaderCells: [] 1.75 + }, 1.76 + { 1.77 + cell: "lb2_cell2", 1.78 + rowHeaderCells: [], 1.79 + columnHeaderCells: [] 1.80 + }, 1.81 + { 1.82 + cell: "lb2_cell3", 1.83 + rowHeaderCells: [], 1.84 + columnHeaderCells: [ "lb2_cell0" ] 1.85 + }, 1.86 + { 1.87 + cell: "lb2_cell4", 1.88 + rowHeaderCells: [ "lb2_cell3" ], 1.89 + columnHeaderCells: [ "lb2_cell1" ] 1.90 + }, 1.91 + { 1.92 + cell: "lb2_cell5", 1.93 + rowHeaderCells: [ "lb2_cell3" ], 1.94 + columnHeaderCells: [ "lb2_cell2" ] 1.95 + }, 1.96 + { 1.97 + cell: "lb2_cell6", 1.98 + rowHeaderCells: [], 1.99 + columnHeaderCells: [ "lb2_cell0" ] 1.100 + }, 1.101 + { 1.102 + cell: "lb2_cell7", 1.103 + rowHeaderCells: [ "lb2_cell6" ], 1.104 + columnHeaderCells: [ "lb2_cell1" ] 1.105 + }, 1.106 + { 1.107 + cell: "lb2_cell8", 1.108 + rowHeaderCells: [ "lb2_cell6" ], 1.109 + columnHeaderCells: [ "lb2_cell2" ] 1.110 + } 1.111 + ]; 1.112 + 1.113 + testHeaderCells(headerInfoMap); 1.114 + 1.115 + SimpleTest.finish(); 1.116 + } 1.117 + 1.118 + SimpleTest.waitForExplicitFinish(); 1.119 + addA11yLoadEvent(doTest); 1.120 + ]]> 1.121 + </script> 1.122 + 1.123 + <hbox style="overflow: auto;"> 1.124 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.125 + <a target="_blank" 1.126 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424" 1.127 + title="implement IAccessibleTable2"> 1.128 + Mozilla Bug 512424 1.129 + </a> 1.130 + 1.131 + <p id="display"></p> 1.132 + <div id="content" style="display: none"> 1.133 + </div> 1.134 + <pre id="test"> 1.135 + </pre> 1.136 + </body> 1.137 + 1.138 + <vbox flex="1"> 1.139 + 1.140 + <label control="listbox" value="multicolumn listbox with header"/> 1.141 + <listbox id="listbox"> 1.142 + <listhead> 1.143 + <listheader id="lb1_header1" label="header1"/> 1.144 + <listheader id="lb1_header2" label="header2"/> 1.145 + <listheader id="lb1_header3" label="header3"/> 1.146 + </listhead> 1.147 + <listcols> 1.148 + <listcol flex="1"/> 1.149 + <listcol flex="1"/> 1.150 + <listcol flex="1"/> 1.151 + </listcols> 1.152 + <listitem> 1.153 + <listcell id="lb1_cell0" label="cell0"/> 1.154 + <listcell id="lb1_cell1" label="cell1"/> 1.155 + <listcell id="lb1_cell2" label="cell2"/> 1.156 + </listitem> 1.157 + <listitem> 1.158 + <listcell id="lb1_cell3" label="cell3"/> 1.159 + <listcell id="lb1_cell4" label="cell4"/> 1.160 + <listcell id="lb1_cell5" label="cell5"/> 1.161 + </listitem> 1.162 + <listitem> 1.163 + <listcell id="lb1_cell6" label="cell6"/> 1.164 + <listcell id="lb1_cell7" label="cell7"/> 1.165 + <listcell id="lb1_cell8" label="cell8"/> 1.166 + </listitem> 1.167 + </listbox> 1.168 + 1.169 + <label control="listbox2" value="multicolumn listbox with ARIA headers"/> 1.170 + <listbox id="listbox2"> 1.171 + <listcols> 1.172 + <listcol flex="1"/> 1.173 + <listcol flex="1"/> 1.174 + <listcol flex="1"/> 1.175 + </listcols> 1.176 + <listitem> 1.177 + <listcell role="columnheader" id="lb2_cell0" label="cell0"/> 1.178 + <listcell role="columnheader" id="lb2_cell1" label="cell1"/> 1.179 + <listcell role="columnheader" id="lb2_cell2" label="cell2"/> 1.180 + </listitem> 1.181 + <listitem> 1.182 + <listcell role="rowheader" id="lb2_cell3" label="cell3"/> 1.183 + <listcell id="lb2_cell4" label="cell4"/> 1.184 + <listcell id="lb2_cell5" label="cell5"/> 1.185 + </listitem> 1.186 + <listitem> 1.187 + <listcell role="rowheader" id="lb2_cell6" label="cell6"/> 1.188 + <listcell id="lb2_cell7" label="cell7"/> 1.189 + <listcell id="lb2_cell8" label="cell8"/> 1.190 + </listitem> 1.191 + </listbox> 1.192 + 1.193 + </vbox> 1.194 + </hbox> 1.195 + 1.196 +</window> 1.197 +