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

mercurial