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

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

Issue 2893683002: Selection follows focus/activedescendant in single selection containers (Closed)
Patch Set: Last test to fix we hope 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
Index: third_party/WebKit/LayoutTests/accessibility/listbox-focus.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/listbox-focus.html b/third_party/WebKit/LayoutTests/accessibility/listbox-focus.html
index d0b7d0db00bcc770cf1b2f4421f7ee2cc670bc38..017a2c8d3db1e32e30e5aab67cc11b7ed2fd55d6 100644
--- a/third_party/WebKit/LayoutTests/accessibility/listbox-focus.html
+++ b/third_party/WebKit/LayoutTests/accessibility/listbox-focus.html
@@ -5,6 +5,7 @@
<option id="item0">Alicia</option>
<option id="item1">Peter</option>
<option id="item2">Kalinda</option>
+ <option id="item3" disabled>Frank</option>
</select>
<script>
async_test(function(t)
@@ -37,4 +38,18 @@ async_test(function(t)
listbox.selectedIndex = 1;
}, 0);
}, "menu list fires correct events when active index changes.");
+
+function axElementById(id) {
+ return accessibilityController.accessibleElementById(id);
+}
+
+test(function(t) {
+ var axOption = axElementById("item2");
+ assert_equals(axOption.isFocusable, true);
+}, "Listbox option is focusable");
+
+test(function(t) {
+ var axOption = axElementById("item3");
+ assert_equals(axOption.isFocusable, false);
+}, "Disabled listbox option is not focusable");
</script>

Powered by Google App Engine
This is Rietveld 408576698