|
1 <html> |
|
2 |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
5 <title>Keyboard shortcuts tests</title> |
|
6 <link rel="stylesheet" type="text/css" |
|
7 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
8 |
|
9 <script type="application/javascript" |
|
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
11 |
|
12 <script type="application/javascript" |
|
13 src="../common.js"></script> |
|
14 |
|
15 <script type="application/javascript"> |
|
16 function testAcessKey(aAccOrElmOrID, aKey) |
|
17 { |
|
18 var acc = getAccessible(aAccOrElmOrID); |
|
19 if (!acc) |
|
20 return; |
|
21 |
|
22 is(acc.accessKey, aKey, |
|
23 "Wrong keyboard shortcut on " + prettyName(aAccOrElmOrID)); |
|
24 } |
|
25 |
|
26 function doTest() |
|
27 { |
|
28 testAcessKey("input1", ""); |
|
29 testAcessKey("input2", MAC ? "⌃⌥b" : "Alt+Shift+b"); |
|
30 testAcessKey("link", MAC ? "⌃⌥l" : "Alt+Shift+l"); |
|
31 |
|
32 SimpleTest.finish(); |
|
33 } |
|
34 |
|
35 SimpleTest.waitForExplicitFinish(); |
|
36 addA11yLoadEvent(doTest); |
|
37 </script> |
|
38 |
|
39 </head> |
|
40 |
|
41 <body> |
|
42 |
|
43 <a target="_blank" |
|
44 href="https://bugzilla.mozilla.org/show_bug.cgi?id=381599" |
|
45 title="Inverse relations cache"> |
|
46 Mozilla Bug 381599 |
|
47 </a> |
|
48 <p id="display"></p> |
|
49 <div id="content" style="display: none"></div> |
|
50 <pre id="test"> |
|
51 </pre> |
|
52 |
|
53 <label accesskey="a"> |
|
54 <input id="input1"/> |
|
55 </label> |
|
56 <label accesskey="b" for="input2"> |
|
57 <input id="input2"/> |
|
58 <a id="link" accesskey="l">link</a> |
|
59 </body> |
|
60 </html> |