Index: third_party/WebKit/LayoutTests/accessibility/html-input-mixed.html |
diff --git a/third_party/WebKit/LayoutTests/accessibility/html-input-mixed.html b/third_party/WebKit/LayoutTests/accessibility/html-input-mixed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b167265a47d581b028e9ac433a1d26cb13691069 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/accessibility/html-input-mixed.html |
@@ -0,0 +1,44 @@ |
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
+<html> |
+<head> |
+<script src="../resources/js-test.js"></script> |
+</head> |
+<body id="body"> |
+ |
+<input id="element1" type="checkbox" /> <!-- Will set indeterminate state via JS --> |
dmazzoni
2017/02/16 20:56:04
Maybe put this comment on the line above so it fit
aleventhal
2017/02/24 21:44:01
Done.
|
+<input id="element2" type="checkbox" /> <!-- Control--> |
+ |
+<div> |
+ <!-- Will be ::intederminate in CSS because no radio item selected yet --> |
+ <input type="radio" name="radiogroup1" /> |
+ <input id="element3" type="radio" name="radiogroup1" /> |
+</div> |
+ |
+<div> |
+ <!-- NOT mixed/intederminate because group has a selected radio button --> |
+ <input type="radio" name="radiogroup2" /> |
dmazzoni
2017/02/16 20:56:04
Might be nice to put an id on this one and check i
aleventhal
2017/02/24 21:44:01
Done.
|
+ <input id="element4" type="radio" checked name="radiogroup2" /> |
+</div> |
+ |
+<p id="description"></p> |
+<div id="console"></div> |
+ |
+<script> |
+ |
+ description("Check whether native mixed state is reported properly"); |
+ |
+ // No way currently to do this via markup, must be via JS |
+ document.getElementById('element1').indeterminate = true; |
dmazzoni
2017/02/16 20:56:04
You could put a <script> tag right after the eleme
aleventhal
2017/02/24 21:44:01
Done.
|
+ |
+ if (window.accessibilityController) { |
+ for (var i = 1; i <= 4; i++) { |
+ var element = accessibilityController.accessibleElementById("element" + i); |
+ debug("Role: " + element.role); |
dmazzoni
2017/02/16 20:56:04
This is an old-style test, where you dump out text
aleventhal
2017/02/24 21:44:01
Instead of this one, right?
|
+ debug("Mixed: " + element.isButtonStateMixed); |
+ } |
+ } |
+ |
+</script> |
+ |
+</body> |
+</html> |