tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_obj_group_tree.xhtml (2342B)


      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="Accessible XUL tree attributes tests">
      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="../attributes.js" />
     18  <script type="application/javascript"
     19          src="../events.js" />
     20 
     21  <script type="application/javascript">
     22  <![CDATA[
     23    ////////////////////////////////////////////////////////////////////////////
     24    // Test
     25 
     26    function doTest()
     27    {
     28      var treeNode = getNode("tree");
     29 
     30      var tree = getAccessible(treeNode);
     31      var treeitem1 = tree.firstChild.nextSibling;
     32      testGroupAttrs(treeitem1, 1, 4, 1);
     33 
     34      var treeitem2 = treeitem1.nextSibling;
     35      testGroupAttrs(treeitem2, 2, 4, 1);
     36 
     37      var treeitem3 = treeitem2.nextSibling;
     38      testGroupAttrs(treeitem3, 1, 2, 2);
     39 
     40      var treeitem4 = treeitem3.nextSibling;
     41      testGroupAttrs(treeitem4, 2, 2, 2);
     42 
     43      var treeitem5 = treeitem4.nextSibling;
     44      testGroupAttrs(treeitem5, 3, 4, 1);
     45 
     46      var treeitem6 = treeitem5.nextSibling;
     47      testGroupAttrs(treeitem6, 4, 4, 1);
     48 
     49      SimpleTest.finish();
     50    }
     51 
     52    SimpleTest.waitForExplicitFinish();
     53    addA11yXULTreeLoadEvent(doTest, "tree", new nsTreeTreeView());
     54  ]]>
     55  </script>
     56 
     57  <hbox flex="1" style="overflow: auto;">
     58    <body xmlns="http://www.w3.org/1999/xhtml">
     59      <a target="_blank"
     60         href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727"
     61         title="Reorganize implementation of XUL tree accessibility">
     62        Mozilla Bug 503727
     63      </a><br/>
     64      <p id="display"></p>
     65      <div id="content" style="display: none">
     66      </div>
     67      <pre id="test">
     68      </pre>
     69    </body>
     70 
     71    <vbox flex="1">
     72      <tree id="tree" flex="1">
     73        <treecols>
     74          <treecol id="col" flex="1" primary="true" label="column"/>
     75        </treecols>
     76        <treechildren/>
     77      </tree>
     78 
     79      <vbox id="debug"/>
     80    </vbox>
     81  </hbox>
     82 
     83 </window>