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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/aria-treeitem-checkable.html

Issue 2906083002: Basic test for treeitem checkability (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/accessibility/aria-treeitem-checkable.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-treeitem-checkable.html b/third_party/WebKit/LayoutTests/accessibility/aria-treeitem-checkable.html
new file mode 100644
index 0000000000000000000000000000000000000000..15b4a794c684c61442653f1bf9778a8d3f476c27
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-treeitem-checkable.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<div role="treeitem" id="treeitem-false" aria-checked="false">Not checked</div>
+<div role="treeitem" id="treeitem-true" aria-checked="true">Checked</div>
+
+
+<script>
+function axElementById(id) {
+ return accessibilityController.accessibleElementById(id);
+}
+
+test(function(t) {
+ var treeItem = axElementById("treeitem-false");
+ assert_equals(treeItem.isChecked, false);
+}, "A tree item with aria-checked=false has checkedState=false");
+
+test(function(t) {
+ var treeItem = axElementById("treeitem-true");
+ assert_equals(treeItem.isChecked, true);
+}, "A tree item with aria-checked=true has checkedState=true");
+</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698