accessible/tests/mochitest/actions/test_select.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial