Index: third_party/WebKit/LayoutTests/accessibility/disabled-not-selectable.html |
diff --git a/third_party/WebKit/LayoutTests/accessibility/disabled-not-selectable.html b/third_party/WebKit/LayoutTests/accessibility/disabled-not-selectable.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ea89946cec254fcbacdeaca470777ab1d3819919 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/accessibility/disabled-not-selectable.html |
@@ -0,0 +1,146 @@ |
+<!DOCTYPE HTML> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+ |
+<div id="treeitem1" role="treeitem" tabindex="-1">X</div> |
+<div id="option1" role="option" tabindex="-1">X</div> |
+<div id="tab1" role="tab" tabindex="-1">X</div> |
+<div id="gridcell1" role="gridcell" tabindex="-1">X</div> |
+<div id="checkbox1" role="checkbox" tabindex="-1"">X</div> |
+ |
+<div id="treeitem2" role="treeitem" tabindex="-1" aria-selected="true">X</div> |
+<div id="option2" role="option" tabindex="-1" aria-selected="true">X</div> |
+<div id="tab2" role="tab" tabindex="-1" aria-selected="true">X</div> |
+<div id="gridcell2" role="gridcell" tabindex="-1" aria-selected="true">X</div> |
+<div id="checkbox2" role="checkbox" tabindex="-1" aria-selected="true">X</div> |
+ |
+<div id="treeitem3" role="treeitem" tabindex="-1" aria-selected="true" aria-disabled="true">X</div> |
+<div id="option3" role="option" tabindex="-1" aria-selected="true" aria-disabled="true">X</div> |
+<div id="tab3" role="tab" tabindex="-1" aria-selected="true" aria-disabled="true">X</div> |
+<div id="gridcell3" role="gridcell" tabindex="-1" aria-selected="true" aria-disabled="true">X</div> |
+ |
+<script> |
+var listbox = document.getElementById("listbox"); |
+ |
+function axElementById(id) { |
+ return accessibilityController.accessibleElementById(id); |
+} |
+ |
+test(function(t) { |
+ var ax = axElementById("treeitem1"); |
+ assert_equals(ax.isEnabled, true); |
+}, "Tree item enabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("option1"); |
+ assert_equals(ax.isEnabled, true); |
+}, "Option enabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("tab1"); |
+ assert_equals(ax.isEnabled, true); |
+}, "Tab enabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("gridcell1"); |
+ assert_equals(ax.isEnabled, true); |
+}, "Grid cell enabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("checkbox1"); |
+ assert_equals(ax.isEnabled, true); |
+}, "Check boxs enabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("treeitem1"); |
+ assert_equals(ax.isSelectable, true); |
+}, "Tree item selectable"); |
+ |
+test(function(t) { |
+ var ax = axElementById("option1"); |
+ assert_equals(ax.isSelectable, true); |
+}, "Option selectable"); |
+ |
+test(function(t) { |
+ var ax = axElementById("tab1"); |
+ assert_equals(ax.isSelectable, true); |
+}, "Tab selectable"); |
+ |
+test(function(t) { |
+ var ax = axElementById("gridcell1"); |
+ assert_equals(ax.isSelectable, true); |
+}, "Grid cell selectable"); |
+ |
+test(function(t) { |
+ var ax = axElementById("checkbox1"); |
+ assert_equals(ax.isSelectable, false); |
+}, "Check box not selectable because it is not a selectable role"); |
+ |
+test(function(t) { |
+ var ax = axElementById("treeitem2"); |
+ assert_equals(ax.isSelected, true); |
+}, "Tree item selected"); |
+ |
+test(function(t) { |
+ var ax = axElementById("option2"); |
+ assert_equals(ax.isSelected, true); |
+}, "Option selected"); |
+ |
+test(function(t) { |
+ var ax = axElementById("tab2"); |
+ assert_equals(ax.isSelected, true); |
+}, "Tab selected"); |
+ |
+test(function(t) { |
+ var ax = axElementById("gridcell2"); |
+ assert_equals(ax.isSelected, true); |
+}, "Grid cell selected"); |
+ |
+test(function(t) { |
+ var ax = axElementById("checkbox2"); |
+ assert_equals(ax.isSelected, false); |
+}, "Check box not selected because it is not a selectable role"); |
+ |
+test(function(t) { |
+ var ax = axElementById("treeitem3"); |
+ assert_equals(ax.isSelectable, false); |
+}, "Tree item not selectable if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("option3"); |
+ assert_equals(ax.isSelectable, false); |
+}, "Option not selectable if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("tab3"); |
+ assert_equals(ax.isSelectable, false); |
+}, "Tab not selectable if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("gridcell3"); |
+ assert_equals(ax.isSelectable, false); |
+}, "Grid cell not selectable if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("treeitem3"); |
+ assert_equals(ax.isSelected, false); |
+}, "Tree item not selected if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("option3"); |
+ assert_equals(ax.isSelected, false); |
+}, "Option not selected if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("tab3"); |
+ assert_equals(ax.isSelected, false); |
+}, "Tab not selected if disabled"); |
+ |
+test(function(t) { |
+ var ax = axElementById("gridcell3"); |
+ assert_equals(ax.isSelected, false); |
+}, "Grid cell not selected if disabled"); |
+ |
+ |
+ |
+</script> |