accessible/tests/mochitest/actions/test_general.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 on HTML elements</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="../events.js"></script>
michael@0 16 <script type="application/javascript"
michael@0 17 src="../actions.js"></script>
michael@0 18
michael@0 19 <script type="application/javascript">
michael@0 20 function doTest()
michael@0 21 {
michael@0 22 var actionsArray = [
michael@0 23 {
michael@0 24 ID: "li_clickable1",
michael@0 25 actionName: "click",
michael@0 26 events: CLICK_EVENTS
michael@0 27 },
michael@0 28 {
michael@0 29 ID: "li_clickable2",
michael@0 30 actionName: "click",
michael@0 31 events: CLICK_EVENTS
michael@0 32 },
michael@0 33 {
michael@0 34 ID: "li_clickable3",
michael@0 35 actionName: "click",
michael@0 36 events: CLICK_EVENTS
michael@0 37 },
michael@0 38 {
michael@0 39 ID: "onclick_img",
michael@0 40 actionName: "click",
michael@0 41 events: CLICK_EVENTS
michael@0 42 }
michael@0 43 ];
michael@0 44
michael@0 45 testActions(actionsArray);
michael@0 46
michael@0 47 getAccessible("onclick_img").takeFocus();
michael@0 48 is(getAccessible("link1").actionCount, 1, "links should have one action");
michael@0 49 is(getAccessible("link2").actionCount, 1, "link with onclick handler should have 1 action");
michael@0 50 }
michael@0 51
michael@0 52 SimpleTest.waitForExplicitFinish();
michael@0 53 addA11yLoadEvent(doTest);
michael@0 54 </script>
michael@0 55 </head>
michael@0 56
michael@0 57 <body>
michael@0 58
michael@0 59 <a target="_blank"
michael@0 60 href="https://bugzilla.mozilla.org/show_bug.cgi?id=523789"
michael@0 61 title="nsHTMLLiAccessible shouldn't be inherited from linkable accessible">
michael@0 62 Mozilla Bug 523789
michael@0 63 </a><br>
michael@0 64 <a target="_blank"
michael@0 65 href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
michael@0 66 title="Expose click action if mouseup and mousedown are registered">
michael@0 67 Mozilla Bug 423409
michael@0 68 </a>
michael@0 69 <a target="_blank"
michael@0 70 href="https://bugzilla.mozilla.org/show_bug.cgi?id=659620"
michael@0 71 title="hang when trying to edit a page on wikimo with NVDA running">
michael@0 72 Mozilla Bug 659620
michael@0 73 </a>
michael@0 74 <p id="display"></p>
michael@0 75 <div id="content" style="display: none"></div>
michael@0 76 <pre id="test">
michael@0 77 </pre>
michael@0 78
michael@0 79 <ul>
michael@0 80 <li id="li_clickable1" onclick="">Clickable list item</li>
michael@0 81 <li id="li_clickable2" onmousedown="">Clickable list item</li>
michael@0 82 <li id="li_clickable3" onmouseup="">Clickable list item</li>
michael@0 83 </ul>
michael@0 84
michael@0 85 <!-- linkable accessibles -->
michael@0 86 <img id="onclick_img" onclick="" src="../moz.png">
michael@0 87
michael@0 88 <a id="link1" href="www">linkable textleaf accessible</a>
michael@0 89 <div id="link2" onclick="">linkable textleaf accessible</div>
michael@0 90 </body>
michael@0 91 </html>

mercurial