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

Unified Diff: LayoutTests/accessibility/listbox-focus.html

Issue 1034493005: Fire AX notifications on list box options. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@menu_list_more
Patch Set: Update expectations for other test that failed Created 5 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/listbox-focus.html
diff --git a/LayoutTests/accessibility/listbox-focus.html b/LayoutTests/accessibility/listbox-focus.html
new file mode 100644
index 0000000000000000000000000000000000000000..c8977dceb0d5554e1fac08dbacc61dc9522c4902
--- /dev/null
+++ b/LayoutTests/accessibility/listbox-focus.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<select id="listbox" size="3">
+ <option id="item0">Alicia</option>
+ <option id="item1">Peter</option>
+ <option id="item2">Kalinda</option>
+</select>
+<script>
+async_test(function(t)
+{
+ var listbox = document.getElementById("listbox");
+ listbox.selectedIndex = 0;
+ listbox.focus();
+
+ accessibilityController.accessibleElementById('dummy');
+
+ var gotCheckedStateChanged = false;
+ var gotSelectedChildrenChanged = false;
+ var gotFocus = false;
+
+ window.setTimeout(function() {
+ var result = "";
+ accessibilityController.addNotificationListener(t.step_func(function listener(element, notification) {
+ if (notification == "CheckedStateChanged") {
+ assert_equals(element.role, "AXRole: AXListBoxOption");
+ gotCheckedStateChanged = true;
+ }
+ if (notification == "SelectedChildrenChanged") {
+ assert_equals(element.role, "AXRole: AXListBox");
+ gotSelectedChildrenChanged = true;
+ }
+ if (notification == "Focus") {
+ assert_equals(element.role, "AXRole: AXListBoxOption");
+ gotFocus = true;
+ }
+ if (gotCheckedStateChanged && gotSelectedChildrenChanged && gotFocus) {
+ t.done();
+ }
+ }));
+
+ listbox.selectedIndex = 1;
+ }, 0);
+}, "menu list fires focus event on close");
+</script>
« no previous file with comments | « no previous file | LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698