accessible/tests/mochitest/table/test_headers_tree.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/table/test_headers_tree.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,101 @@
     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 tree">
    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="../treeview.js" />
    1.17 +
    1.18 +  <script type="application/javascript"
    1.19 +          src="../common.js" />
    1.20 +  <script type="application/javascript"
    1.21 +          src="../events.js" />
    1.22 +  <script type="application/javascript"
    1.23 +          src="../table.js" />
    1.24 +
    1.25 +  <script type="application/javascript">
    1.26 +  <![CDATA[
    1.27 +    ////////////////////////////////////////////////////////////////////////////
    1.28 +    // Test
    1.29 +
    1.30 +    // gA11yEventDumpID = "debug";
    1.31 +
    1.32 +    function doTest()
    1.33 +    {
    1.34 +      var treeAcc = getAccessible("tree", [nsIAccessibleTable]);
    1.35 +
    1.36 +      var headerInfoMap = [
    1.37 +        {
    1.38 +          cell: treeAcc.getCellAt(0, 0),
    1.39 +          rowHeaderCells: [],
    1.40 +          columnHeaderCells: [ "col" ]
    1.41 +        },
    1.42 +        {
    1.43 +          cell: treeAcc.getCellAt(0, 1),
    1.44 +          rowHeaderCells: [],
    1.45 +          columnHeaderCells: [ "scol" ]
    1.46 +        },
    1.47 +        {
    1.48 +          cell: treeAcc.getCellAt(1, 0),
    1.49 +          rowHeaderCells: [],
    1.50 +          columnHeaderCells: [ "col" ]
    1.51 +        },
    1.52 +        {
    1.53 +          cell: treeAcc.getCellAt(1, 1),
    1.54 +          rowHeaderCells: [],
    1.55 +          columnHeaderCells: [ "scol" ]
    1.56 +        },
    1.57 +        {
    1.58 +          cell: treeAcc.getCellAt(2, 0),
    1.59 +          rowHeaderCells: [],
    1.60 +          columnHeaderCells: [ "col" ]
    1.61 +        },
    1.62 +        {
    1.63 +          cell: treeAcc.getCellAt(2, 1),
    1.64 +          rowHeaderCells: [],
    1.65 +          columnHeaderCells: [ "scol" ]
    1.66 +        },
    1.67 +      ];
    1.68 +
    1.69 +      testHeaderCells(headerInfoMap);
    1.70 +
    1.71 +      SimpleTest.finish();
    1.72 +    }
    1.73 +
    1.74 +    SimpleTest.waitForExplicitFinish();
    1.75 +    addA11yXULTreeLoadEvent(doTest, "tree", new nsTableTreeView(3));
    1.76 +  ]]>
    1.77 +  </script>
    1.78 +
    1.79 +  <hbox flex="1" style="overflow: auto;">
    1.80 +    <body xmlns="http://www.w3.org/1999/xhtml">
    1.81 +      <a target="_blank"
    1.82 +         href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424"
    1.83 +         title="implement IAccessibleTable2">
    1.84 +        Mozilla Bug 512424
    1.85 +      </a><br/>
    1.86 +      <p id="display"></p>
    1.87 +      <div id="content" style="display: none">
    1.88 +      </div>
    1.89 +      <pre id="test">
    1.90 +      </pre>
    1.91 +    </body>
    1.92 +
    1.93 +    <vbox id="debug"/>
    1.94 +    <tree id="tree" flex="1">
    1.95 +      <treecols>
    1.96 +        <treecol id="col" flex="1" primary="true" label="column"/>
    1.97 +        <treecol id="scol" flex="1" label="column 2"/>
    1.98 +      </treecols>
    1.99 +      <treechildren id="treechildren"/>
   1.100 +    </tree>
   1.101 +  </hbox>
   1.102 +
   1.103 +</window>
   1.104 +

mercurial