accessible/tests/mochitest/tree/test_button.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 button hierarchy tests">
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
    12   <script type="application/javascript"
    13           src="../common.js" />
    14   <script type="application/javascript"
    15           src="../role.js" />
    17   <script type="application/javascript">
    18   <![CDATA[
    19     ////////////////////////////////////////////////////////////////////////////
    20     // Test
    22     function doTest()
    23     {
    24       //////////////////////////////////////////////////////////////////////////
    25       // button
    27       var accTree = {
    28         role: ROLE_PUSHBUTTON,
    29         name: "hello",
    30         children: [ ]
    31       };
    32       testAccessibleTree("button1", accTree);
    34       //////////////////////////////////////////////////////////////////////////
    35       // toolbarbutton
    37       var accTree = {
    38         role: ROLE_PUSHBUTTON,
    39         name: "hello",
    40         children: [ ]
    41       };
    42       testAccessibleTree("button2", accTree);
    44       SimpleTest.finish()
    45     }
    47     SimpleTest.waitForExplicitFinish();
    48     addA11yLoadEvent(doTest);
    49   ]]>
    50   </script>
    52   <hbox flex="1" style="overflow: auto;">
    53     <body xmlns="http://www.w3.org/1999/xhtml">
    54       <a target="_blank"
    55          href="https://bugzilla.mozilla.org/show_bug.cgi?id=249292"
    56          title="Ensure accessible children for toolbarbutton types 'menu' and 'menu-button'">
    57         Mozilla Bug 249292
    58       </a><br/>
    59       <p id="display"></p>
    60       <div id="content" style="display: none">
    61       </div>
    62       <pre id="test">
    63       </pre>
    64     </body>
    66     <vbox flex="1">
    67       <button id="button1" label="hello"/>
    68       <toolbarbutton id="button2" label="hello"/>
    69     </vbox>
    70   </hbox>
    72 </window>

mercurial