accessible/tests/mochitest/actions/test_controls.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <html>
michael@0 2
michael@0 3 <head>
michael@0 4 <title>nsIAccessible actions testing for inputs</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 function doTest()
michael@0 25 {
michael@0 26 var actionsArray = [
michael@0 27 {
michael@0 28 ID: "button",
michael@0 29 actionName: "press",
michael@0 30 events: CLICK_EVENTS
michael@0 31 },
michael@0 32 {
michael@0 33 ID: "input_button",
michael@0 34 actionName: "press",
michael@0 35 events: CLICK_EVENTS
michael@0 36 },
michael@0 37 {
michael@0 38 ID: "checkbox_unchecked",
michael@0 39 actionName: "check",
michael@0 40 events: CLICK_EVENTS
michael@0 41 },
michael@0 42 {
michael@0 43 ID: "checkbox_checked",
michael@0 44 actionName: "uncheck",
michael@0 45 events: CLICK_EVENTS
michael@0 46 },
michael@0 47 {
michael@0 48 ID: "checkbox_mixed",
michael@0 49 actionName: "cycle",
michael@0 50 events: CLICK_EVENTS
michael@0 51 },
michael@0 52 {
michael@0 53 ID: "radio",
michael@0 54 actionName: "select",
michael@0 55 events: CLICK_EVENTS
michael@0 56 },
michael@0 57 {
michael@0 58 ID: "textarea",
michael@0 59 actionName: "activate",
michael@0 60 events: FOCUS_EVENT
michael@0 61 },
michael@0 62 {
michael@0 63 ID: "textinput",
michael@0 64 actionName: "activate",
michael@0 65 events: FOCUS_EVENT
michael@0 66 }
michael@0 67
michael@0 68 ];
michael@0 69 document.getElementById("checkbox_mixed").indeterminate = true;
michael@0 70
michael@0 71 testActions(actionsArray);
michael@0 72 }
michael@0 73
michael@0 74 SimpleTest.waitForExplicitFinish();
michael@0 75 addA11yLoadEvent(doTest);
michael@0 76 </script>
michael@0 77 </head>
michael@0 78
michael@0 79 <body>
michael@0 80
michael@0 81 <a target="_blank"
michael@0 82 href="https://bugzilla.mozilla.org/show_bug.cgi?id=477975"
michael@0 83 title="nsIAccessible actions testing">
michael@0 84 Mozilla Bug 477975
michael@0 85 </a>
michael@0 86 <p id="display"></p>
michael@0 87 <div id="content" style="display: none"></div>
michael@0 88 <pre id="test">
michael@0 89 </pre>
michael@0 90
michael@0 91 <button id="button">Button</button>
michael@0 92
michael@0 93 <input id="input_button" type="button" value="normal">
michael@0 94
michael@0 95 <input id="checkbox_unchecked" type="checkbox">Checkbox</input>
michael@0 96
michael@0 97 <input id="checkbox_checked" type="checkbox" checked="true">Checkbox</input>
michael@0 98
michael@0 99 <input id="checkbox_mixed" type="checkbox">Checkbox</input>
michael@0 100
michael@0 101 <fieldset>
michael@0 102 <input id="radio" type="radio">Radio</input>
michael@0 103 </fieldset>
michael@0 104
michael@0 105 <textarea id="textarea" placeholder="What's happening?"></textarea>
michael@0 106
michael@0 107 <input id="textinput" type="text">
michael@0 108 </body>
michael@0 109 </html>

mercurial