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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/input-mixed.html

Issue 2694903010: AX checked state changes (Closed)
Patch Set: Test checkbox attribute in automation API, fix whitespace, remove change to third party code Created 3 years, 9 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 <!-- Will set indeterminate state via JS -->
5 <input id="element1" type="checkbox" />
6 <script>
7 // No way currently to do this via markup, must be via JS
8 document.getElementById('element1').indeterminate = true;
9 </script>
10 <!-- Control-->
11 <input id="element2" type="checkbox" />
12
13 <div>
14 <!-- Will be ::intederminate in CSS because no radio item selected yet -->
dmazzoni 2017/03/09 19:33:41 spelling
aleventhal 2017/03/09 21:40:49 Done.
15 <input type="radio" name="radiogroup1" />
16 <input id="element3" type="radio" name="radiogroup1" />
17 </div>
18
19 <div>
20 <!-- NOT mixed/intederminate because group has a selected radio button -->
dmazzoni 2017/03/09 19:33:41 same
aleventhal 2017/03/09 21:40:49 Done.
21 <input id="element4" type="radio" name="radiogroup2" />
22 <input id="element5" type="radio" checked name="radiogroup2" />
23 </div>
24
25 <script>
26
27 function axElementById(id) {
28 return accessibilityController.accessibleElementById(id);
29 }
30
31 test(function(t) {
32 var ax = axElementById("element1");
33 assert_true(ax.isButtonStateMixed);
34 }, "A native indeterminate checkbox must have the mixed state");
35
36 test(function(t) {
37 var ax = axElementById("element2");
38 assert_false(ax.isButtonStateMixed);
39 }, "A native checkbox that is not indeterminate" +
40 " must NOT have the mixed state");
41
42 test(function(t) {
43 var ax = axElementById("element3");
44 assert_true(ax.isButtonStateMixed);
45 }, "A native radio that in a group with nothing checked" +
46 " must have the mixed state");
47
48 test(function(t) {
49 var ax = axElementById("element4");
50 assert_false(ax.isButtonStateMixed);
51 }, "A native radio that in a group with something checked" +
52 " must NOT have the mixed state");
53
54 test(function(t) {
55 var ax = axElementById("element4");
56 assert_false(ax.isButtonStateMixed);
57 }, "A checked native radio must NOT have the mixed state");
58 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698