1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/table/test_struct_listbox.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,117 @@ 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 accessible tree and table interface tests for XUL listboxes"> 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="../role.js"></script> 1.19 + <script type="application/javascript" 1.20 + src="../table.js"></script> 1.21 + 1.22 + <script type="application/javascript"> 1.23 + <![CDATA[ 1.24 + function doTest() 1.25 + { 1.26 + ////////////////////////////////////////////////////////////////////////// 1.27 + // Multicolumn listbox. 1.28 + 1.29 + var cellsArray = [ 1.30 + [kDataCell, kDataCell], 1.31 + [kDataCell, kDataCell] 1.32 + ]; 1.33 + 1.34 + testTableStruct("listbox1", cellsArray); 1.35 + 1.36 + ////////////////////////////////////////////////////////////////////////// 1.37 + // Multicolumn listbox with header. 1.38 + 1.39 + var cellsArray = [ 1.40 + [kDataCell, kDataCell, kDataCell], 1.41 + [kDataCell, kDataCell, kDataCell], 1.42 + [kDataCell, kDataCell, kDataCell] 1.43 + ]; 1.44 + 1.45 + testTableStruct("listbox2", cellsArray, kListboxColumnHeader); 1.46 + 1.47 + SimpleTest.finish(); 1.48 + } 1.49 + 1.50 + SimpleTest.waitForExplicitFinish(); 1.51 + addA11yLoadEvent(doTest); 1.52 + ]]> 1.53 + </script> 1.54 + 1.55 + <hbox style="overflow: auto;"> 1.56 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.57 + <a target="_blank" 1.58 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424" 1.59 + title="implement IAccessibleTable2"> 1.60 + Mozilla Bug 512424 1.61 + </a> 1.62 + 1.63 + <p id="display"></p> 1.64 + <div id="content" style="display: none"> 1.65 + </div> 1.66 + <pre id="test"> 1.67 + </pre> 1.68 + </body> 1.69 + 1.70 + <vbox flex="1"> 1.71 + 1.72 + <label control="listbox1" value="multicolumn listbox: "/> 1.73 + <listbox id="listbox1"> 1.74 + <listcols> 1.75 + <listcol flex="1"/> 1.76 + <listcol flex="1"/> 1.77 + </listcols> 1.78 + <listitem> 1.79 + <listcell label="cell1"/> 1.80 + <listcell label="cell2"/> 1.81 + </listitem> 1.82 + <listitem> 1.83 + <listcell label="cell1"/> 1.84 + <listcell label="cell2"/> 1.85 + </listitem> 1.86 + </listbox> 1.87 + 1.88 + <label control="listbox2" value="multicolumn listbox with header"/> 1.89 + <listbox id="listbox2"> 1.90 + <listhead> 1.91 + <listheader label="header1"/> 1.92 + <listheader label="header2"/> 1.93 + <listheader label="header3"/> 1.94 + </listhead> 1.95 + <listcols> 1.96 + <listcol flex="1"/> 1.97 + <listcol flex="1"/> 1.98 + <listcol flex="1"/> 1.99 + </listcols> 1.100 + <listitem> 1.101 + <listcell label="cell0"/> 1.102 + <listcell label="cell1"/> 1.103 + <listcell label="cell2"/> 1.104 + </listitem> 1.105 + <listitem> 1.106 + <listcell label="cell3"/> 1.107 + <listcell label="cell4"/> 1.108 + <listcell label="cell5"/> 1.109 + </listitem> 1.110 + <listitem> 1.111 + <listcell label="cell6"/> 1.112 + <listcell label="cell7"/> 1.113 + <listcell label="cell8"/> 1.114 + </listitem> 1.115 + </listbox> 1.116 + </vbox> 1.117 + </hbox> 1.118 + 1.119 +</window> 1.120 +