Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1474)

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html

Issue 2694903010: AX checked state changes (Closed)
Patch Set: git cl try Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <select>
6 <option id="element1" role="menuitemcheckbox">1</option>
7 <option id="element2" role="menuitemcheckbox" aria-checked="true">2</option>
8 <option id="element3" role="menuitemradio">3</option>
9 <option id="element4" role="menuitemradio" aria-checked="true">4</option>
10 <!-- Checked not supported -->
11 <option id="element5" aria-checked="true">5</option>
12 </select>
13
14 <script>
15
16 function axElementById(id) {
17 return accessibilityController.accessibleElementById(id);
18 }
19
20 test(function(t) {
21 var ax = axElementById("element1");
22 assert_false(ax.isChecked);
23 }, "<option> of role menuitemcheckbox is not checked by default");
24
25 test(function(t) {
26 var ax = axElementById("element2");
27 assert_true(ax.isChecked);
28 }, "<option> of role menuitemcheckbox can be checked with aria-checked");
29
30 test(function(t) {
31 var ax = axElementById("element3");
32 assert_false(ax.isChecked);
33 }, "<option> of role menuitemradio is not checked by default");
34
35 test(function(t) {
36 var ax = axElementById("element4");
37 assert_true(ax.isChecked);
38 }, "<option> of role menuitemradio can be checked with aria-checked");
39
40 test(function(t) {
41 var ax = axElementById("element5");
42 assert_false(ax.isChecked);
43 }, "<option> of no role is not checked even with aria-checked set");
44
45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698