OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body id="body"> | 6 <body id="body"> |
7 | 7 |
8 <input type="checkbox" id="check1" /> | 8 <input type="checkbox" id="check1" /> |
9 <input type="checkbox" id="check2" checked /> | 9 <input type="checkbox" id="check2" checked /> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 description("This tests that ARIA checkboxes correctly handle the aria-check
ed attribute."); | 24 description("This tests that ARIA checkboxes correctly handle the aria-check
ed attribute."); |
25 | 25 |
26 if (window.accessibilityController) { | 26 if (window.accessibilityController) { |
27 | 27 |
28 var answers = [[ "check1", "false" ], | 28 var answers = [[ "check1", "false" ], |
29 [ "check2", "true" ], | 29 [ "check2", "true" ], |
30 [ "check3", "false" ], | 30 [ "check3", "false" ], |
31 [ "check4", "true" ], | 31 [ "check4", "true" ], |
32 [ "check5", "false" ], | 32 [ "check5", "false" ], |
33 [ "check6", "true" ], | 33 [ "check6", "false" ], |
34 [ "check7", "false" ], | 34 [ "check7", "true" ], |
35 [ "check8", "true" ]]; | 35 [ "check8", "true" ]]; |
36 | 36 |
37 for (var i = 0; i < answers.length; i++) { | 37 for (var i = 0; i < answers.length; i++) { |
38 var checkbox = document.getElementById(answers[i][0]); | 38 var checkbox = document.getElementById(answers[i][0]); |
39 checkbox.focus(); | 39 checkbox.focus(); |
40 checkbox = accessibilityController.focusedElement; | 40 checkbox = accessibilityController.focusedElement; |
41 shouldBe("checkbox.isChecked", answers[i][1]); | 41 shouldBe("checkbox.isChecked", answers[i][1]); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 </script> | 45 </script> |
46 | 46 |
47 </body> | 47 </body> |
48 </html> | 48 </html> |
OLD | NEW |