test_headers_tree.xhtml (2701B)
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 tree"> 8 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 10 11 <script type="application/javascript" 12 src="../treeview.js" /> 13 14 <script type="application/javascript" 15 src="../common.js" /> 16 <script type="application/javascript" 17 src="../events.js" /> 18 <script type="application/javascript" 19 src="../table.js" /> 20 21 <script type="application/javascript"> 22 <![CDATA[ 23 //////////////////////////////////////////////////////////////////////////// 24 // Test 25 26 // gA11yEventDumpID = "debug"; 27 28 function doTest() 29 { 30 var treeAcc = getAccessible("tree", [nsIAccessibleTable]); 31 32 var headerInfoMap = [ 33 { 34 cell: treeAcc.getCellAt(0, 0), 35 rowHeaderCells: [], 36 columnHeaderCells: [ "col" ] 37 }, 38 { 39 cell: treeAcc.getCellAt(0, 1), 40 rowHeaderCells: [], 41 columnHeaderCells: [ "scol" ] 42 }, 43 { 44 cell: treeAcc.getCellAt(1, 0), 45 rowHeaderCells: [], 46 columnHeaderCells: [ "col" ] 47 }, 48 { 49 cell: treeAcc.getCellAt(1, 1), 50 rowHeaderCells: [], 51 columnHeaderCells: [ "scol" ] 52 }, 53 { 54 cell: treeAcc.getCellAt(2, 0), 55 rowHeaderCells: [], 56 columnHeaderCells: [ "col" ] 57 }, 58 { 59 cell: treeAcc.getCellAt(2, 1), 60 rowHeaderCells: [], 61 columnHeaderCells: [ "scol" ] 62 }, 63 ]; 64 65 testHeaderCells(headerInfoMap); 66 67 SimpleTest.finish(); 68 } 69 70 SimpleTest.waitForExplicitFinish(); 71 addA11yXULTreeLoadEvent(doTest, "tree", new nsTableTreeView(3)); 72 ]]> 73 </script> 74 75 <hbox flex="1" style="overflow: auto;"> 76 <body xmlns="http://www.w3.org/1999/xhtml"> 77 <a target="_blank" 78 href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424" 79 title="implement IAccessibleTable2"> 80 Mozilla Bug 512424 81 </a><br/> 82 <p id="display"></p> 83 <div id="content" style="display: none"> 84 </div> 85 <pre id="test"> 86 </pre> 87 </body> 88 89 <vbox id="debug"/> 90 <tree id="tree" flex="1"> 91 <treecols> 92 <treecol id="col" flex="1" primary="true" label="column"/> 93 <treecol id="scol" flex="1" label="column 2"/> 94 </treecols> 95 <treechildren id="treechildren"/> 96 </tree> 97 </hbox> 98 99 </window>