accessible/tests/mochitest/tree/test_applicationacc.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 Application Accessible 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     // Note: bug 560239 can be tested if this test runs in standalone mode only.
    24     var gURL = "../tree/wnd.xul"
    25     var gWnd = window.openDialog(gURL, "wnd", "chrome,width=600,height=600");
    27     function doTest()
    28     {
    29       // Application accessible should contain two root document accessibles,
    30       // one is for browser window, another one is for open dialog window.
    31       var accTree = {
    32         role: ROLE_APP_ROOT,
    33         children: [
    34           {
    35             role: ROLE_CHROME_WINDOW,
    36             name: "Accessibility Chrome Test Harness - Minefield"
    37           },
    38           {
    39             role: ROLE_CHROME_WINDOW,
    40             name: "Empty Window"
    41           }
    42         ]
    43       };
    44       testAccessibleTree(getApplicationAccessible(), accTree);
    46       gWnd.close();
    48       SimpleTest.finish()
    49     }
    51     SimpleTest.waitForExplicitFinish();
    53     // We need to open dialog window before accessibility is started.
    54     addLoadEvent(doTest);
    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=560239"
    62          title="no children of application accessible for windows open before accessibility was started">
    63         Mozilla Bug 560239
    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>
    71   </hbox>
    73 </window>

mercurial