OLD | NEW |
---|---|
(Empty) | |
1 <script src="../resources/js-test.js"></script> | |
2 <a id="element1" href="http://www.chromium.org">chromium</a> | |
3 <a id="element2" onmousedown="mouseDown()">Mouse Down</a> | |
4 <button id="element3" type="button">Button</button> | |
5 <details id="element4"> | |
6 <summary id="element5">Copyright 2015.</summary> | |
7 <p>The Chromium Authors. All rights reserved.</p> | |
8 </details> | |
9 <input id="element6" list="fruits"> | |
10 <datalist id="fruits"> | |
11 <option value="Apple"> | |
12 <option value="Banana"> | |
13 </datalist> | |
14 <input id="element7" type="button" value="Click input button"> | |
15 <input id="element8" type="checkbox" value="CheckBox"> I have a checkbox | |
16 <input id="element9" type="radio" value="Radio"> Radio | |
17 <input id="element10" type="radio" value="Button"> Button | |
18 <menu> | |
19 <input id="element11" type="button" value="Click menuitem"> | |
20 <input id="element12" type="checkbox" name="vehicle" value="menuItemCheckbox"> I have a menuItem | |
21 <input id="element13" type="radio" name="gender" value="Menu"> Menu | |
22 <input id="element14" type="radio" name="gender" value="ItemRadio"> ItemRadio | |
23 </menu> | |
24 Birthday: <input id="element15" type="date" name="bday"> | |
25 Birthday (date and time): <input id="element16" type="datetime" name="bdaytime"> | |
26 Birthday (date and time-local): <input id="element17" type="datetime-local" name ="bdaytime"> | |
27 Birthday (month and year): <input id="element18" type="month" name="bdaymonth"> | |
28 Select a week: <input id="element19" type="week" name="week_year"> | |
29 Select a file: <input id="element20" type="file" name="img"> | |
30 Min-Max: <input id="element21" type="number" min="1" max="5"> | |
31 <input id="element22" type="range" name="points" min="0" max="10">Color: <input id="element23" type="color" name="color">Select a time: <input id="element24" ty pe="time" name="time"> | |
32 <input id="element25" type="reset"> | |
33 <select id="element26"> | |
34 <option value="Pacific">Pacific</option> | |
35 <option value="Atlantic">Atlantic</option> | |
36 <option value="Indian">Indian</option> | |
37 <option value="Southern">Southern</option> | |
38 <option value="Arctic">Arctic</option> | |
39 </select> | |
40 <select id="element27"multiple> | |
41 <option id="element28" value="Milk">Milk</option> | |
42 <option value="Soda">Soda</option> | |
43 <option value="Coffee">Coffee</option> | |
44 <option value="Water">Water</option> | |
45 </select> | |
46 <textarea id="element29" rows="2" cols="10">TextArea</textarea> | |
47 <meter id="element30" value="0.6">60%</meter> | |
48 <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 | |
49 <input type="range" id="a" value="50">100 +<input type="number" id="b" value= "50"> =<output id="element31" name="x" for="a b"></output> | |
50 </form> | |
51 <form> | |
52 <label for="blue">Blue</label> | |
53 <input id="element32" type="radio" name="color" id="blue" value="blue"> | |
54 <label for="red">Red</label> | |
55 <input type="radio" name="color" id="red" value="red"> | |
56 </form> | |
57 <fieldset> | |
58 <legend id="element33">Text Input Controls</legend> | |
59 Text: <input id="element34" type="text" name="texttest"><br> | |
60 Password: <input id="element35" type="password" name="passtest"><br> | |
61 </fieldset> | |
62 <p>End of test</p> | |
63 <p id="description"></p> | |
64 <div id="console"></div> | |
65 <script> | |
66 description("This test make sure that focusable elements are mapped implicitly t o AX roles."); | |
67 | |
68 if (window.testRunner && window.accessibilityController) { | |
69 window.testRunner.dumpAsText(); | |
70 for (var i = 1; i <= 36; i++) { | |
71 var axElement = accessibilityController.accessibleElementById("element" + i); | |
72 switch(i) { | |
73 case 1: | |
74 case 2: | |
75 shouldBe("axElement.role", "'AXRole: AXLink'"); | |
dmazzoni
2015/04/06 06:05:45
If this were to fail and I was trying to debug it,
| |
76 break; | |
77 case 3: | |
78 shouldBe("axElement.role", "'AXRole: AXButton'"); | |
79 break; | |
80 case 4: | |
81 shouldBe("axElement.role", "'AXRole: AXDetails'"); | |
82 break; | |
83 case 5: | |
84 shouldBe("axElement.role", "'AXRole: AXDisclosureTriangle'"); | |
85 break; | |
86 case 6: | |
87 shouldBe("axElement.role", "'AXRole: AXComboBox'"); | |
88 break; | |
89 case 7: | |
90 shouldBe("axElement.role", "'AXRole: AXButton'"); | |
91 break; | |
92 case 8: | |
93 shouldBe("axElement.role", "'AXRole: AXCheckBox'"); | |
94 break; | |
95 case 9: | |
96 case 10: | |
97 shouldBe("axElement.role", "'AXRole: AXRadioButton'"); | |
98 break; | |
99 case 11: | |
100 shouldBe("axElement.role", "'AXRole: AXMenuItem'"); | |
101 break; | |
102 case 12: | |
103 shouldBe("axElement.role", "'AXRole: AXMenuItemCheckBox'"); | |
104 break; | |
105 case 13: | |
106 case 14: | |
107 shouldBe("axElement.role", "'AXRole: AXMenuItemRadio'"); | |
108 break; | |
109 case 15: | |
110 shouldBe("axElement.role", "'AXRole: AXDateField'"); | |
111 break; | |
112 case 16: | |
113 shouldBe("axElement.role", "'AXRole: AXTextField'"); | |
114 break; | |
115 case 17: | |
dmazzoni
2015/04/06 06:05:45
I'm assuming the missing ones are the ones that di
| |
116 case 18: | |
117 case 19: | |
118 shouldBe("axElement.role", "'AXRole: AXDateTimeField'"); | |
119 break; | |
120 case 20: | |
121 shouldBe("axElement.role", "'AXRole: AXButton'"); | |
122 break; | |
123 case 21: | |
124 shouldBe("axElement.role", "'AXRole: AXSpinButton'"); | |
125 break; | |
126 case 22: | |
127 shouldBe("axElement.role", "'AXRole: AXSlider'"); | |
128 break; | |
129 case 23: | |
130 shouldBe("axElement.role", "'AXRole: AXColorWell'"); | |
131 break; | |
132 case 24: | |
133 shouldBe("axElement.role", "'AXRole: AXTime'"); | |
134 break; | |
135 case 25: | |
136 shouldBe("axElement.role", "'AXRole: AXButton'"); | |
137 break; | |
138 case 26: | |
139 shouldBe("axElement.role", "'AXRole: AXPopUpButton'"); | |
140 break; | |
141 case 27: | |
142 shouldBe("axElement.role", "'AXRole: AXListBox'"); | |
143 break; | |
144 case 28: | |
145 shouldBe("axElement.role", "'AXRole: AXListBoxOption'"); | |
146 break; | |
147 case 29: | |
148 shouldBe("axElement.role", "'AXRole: AXTextArea'"); | |
149 break; | |
150 case 30: | |
151 shouldBe("axElement.role", "'AXRole: AXMeter'"); | |
152 break; | |
153 case 31: | |
154 shouldBe("axElement.role", "'AXRole: AXStatus'"); | |
155 break; | |
156 case 32: | |
157 shouldBe("axElement.role", "'AXRole: AXRadioButton'"); | |
158 break; | |
159 case 33: | |
160 shouldBe("axElement.role", "'AXRole: AXLegend'"); | |
161 break; | |
162 case 34: | |
163 case 35: | |
164 shouldBe("axElement.role", "'AXRole: AXTextField'"); | |
165 break; | |
166 } | |
167 } | |
168 } | |
169 </script> | |
OLD | NEW |