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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/option-aria-checked.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html b/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html
new file mode 100644
index 0000000000000000000000000000000000000000..d109e0999e42ce052de0ca5dcffb487e8b501ee9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<select>
+<option id="element1" role="menuitemcheckbox">1</option>
+<option id="element2" role="menuitemcheckbox" aria-checked="true">2</option>
+<option id="element3" role="menuitemradio">3</option>
+<option id="element4" role="menuitemradio" aria-checked="true">4</option>
+<!-- Checked not supported -->
+<option id="element5" aria-checked="true">5</option>
+</select>
+
+<script>
+
+ function axElementById(id) {
+ return accessibilityController.accessibleElementById(id);
+ }
+
+ test(function(t) {
+ var ax = axElementById("element1");
+ assert_false(ax.isChecked);
+ }, "<option> of role menuitemcheckbox is not checked by default");
+
+ test(function(t) {
+ var ax = axElementById("element2");
+ assert_true(ax.isChecked);
+ }, "<option> of role menuitemcheckbox can be checked with aria-checked");
+
+ test(function(t) {
+ var ax = axElementById("element3");
+ assert_false(ax.isChecked);
+ }, "<option> of role menuitemradio is not checked by default");
+
+ test(function(t) {
+ var ax = axElementById("element4");
+ assert_true(ax.isChecked);
+ }, "<option> of role menuitemradio can be checked with aria-checked");
+
+ test(function(t) {
+ var ax = axElementById("element5");
+ assert_false(ax.isChecked);
+ }, "<option> of no role is not checked even with aria-checked set");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698