|
1 <html> |
|
2 |
|
3 <head> |
|
4 <title>nsIAccessible actions testing for HTML select</title> |
|
5 |
|
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 <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> |
|
22 |
|
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 ]; |
|
74 |
|
75 testActions(actionsArray); |
|
76 } |
|
77 |
|
78 SimpleTest.waitForExplicitFinish(); |
|
79 addA11yLoadEvent(doTest); |
|
80 </script> |
|
81 </head> |
|
82 |
|
83 <body> |
|
84 |
|
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> |
|
94 |
|
95 <select id="listbox" size="2"> |
|
96 <option id="lb_orange">orange</option> |
|
97 <option id="lb_apple">apple</option> |
|
98 </select> |
|
99 |
|
100 <select id="combobox"> |
|
101 <option id="cb_orange">orange</option> |
|
102 <option id="cb_apple">apple</option> |
|
103 </select> |
|
104 </body> |
|
105 </html> |