accessible/tests/mochitest/actions/test_select.html

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 <html>
     3 <head>
     4   <title>nsIAccessible actions testing for HTML select</title>
     6   <link rel="stylesheet" type="text/css"
     7         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    12   <script type="application/javascript"
    13           src="../common.js"></script>
    14   <script type="application/javascript"
    15           src="../role.js"></script>
    16   <script type="application/javascript"
    17           src="../states.js"></script>
    18   <script type="application/javascript"
    19           src="../events.js"></script>
    20   <script type="application/javascript"
    21           src="../actions.js"></script>
    23   <script type="application/javascript">
    24     //gA11yEventDumpToConsole = true; // debugging
    25     function doTest()
    26     {
    27       var actionsArray = [
    28         {
    29           ID: "lb_apple",
    30           actionIndex: 0,
    31           actionName: "select",
    32           events: CLICK_EVENTS,
    33           eventSeq: [
    34             new focusChecker("lb_apple")
    35           ]
    36         },
    37         {
    38           ID: "combobox",
    39           actionIndex: 0,
    40           actionName: "open",
    41           events: CLICK_EVENTS,
    42           eventSeq: [
    43             new focusChecker("cb_orange")
    44           ]
    45         },
    46         {
    47           ID: "cb_apple",
    48           actionIndex: 0,
    49           actionName: "select",
    50           events: CLICK_EVENTS,
    51           eventSeq: [
    52             new focusChecker("combobox")
    53           ]
    54         },
    55         {
    56           ID: "combobox",
    57           actionIndex: 0,
    58           actionName: "open",
    59           events: CLICK_EVENTS,
    60           eventSeq: [
    61             new focusChecker("cb_apple")
    62           ]
    63         },
    64         {
    65           ID: "combobox",
    66           actionIndex: 0,
    67           actionName: "close",
    68           events: CLICK_EVENTS,
    69           eventSeq: [
    70             new focusChecker("combobox")
    71           ]
    72         }
    73       ];
    75       testActions(actionsArray);
    76     }
    78     SimpleTest.waitForExplicitFinish();
    79     addA11yLoadEvent(doTest);
    80   </script>
    81 </head>
    83 <body>
    85   <a target="_blank"
    86      href="https://bugzilla.mozilla.org/show_bug.cgi?id=673958"
    87      title="Rework accessible focus handling">
    88     Mozilla Bug 673958
    89   </a>
    90   <p id="display"></p>
    91   <div id="content" style="display: none"></div>
    92   <pre id="test">
    93   </pre>
    95   <select id="listbox" size="2">
    96     <option id="lb_orange">orange</option>
    97     <option id="lb_apple">apple</option>
    98   </select>
   100   <select id="combobox">
   101     <option id="cb_orange">orange</option>
   102     <option id="cb_apple">apple</option>
   103   </select>
   104 </body>
   105 </html>

mercurial