accessible/tests/mochitest/attributes/test_obj_group_tree.xul

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial