3 <script src=
"../resources/js-test.js"></script>
8 <select id=
"selectElement" multiple
title=
"selectElement">
9 <option SELECTED
>Option
1</option>
10 <option>Option
2</option>
11 <option DISABLED
>Option
3</option>
12 <option aria-disabled=
"true">Option
4</option>
13 <option aria-disabled=
"false">Option
5</option>
16 <p>This tests that we report the correct enabled state on a listbox.
</p>
18 <p id=
"notDRT">This test should only be run inside of DumpRenderTree.
</p>
23 if (window
.testRunner
&& window
.accessibilityController
) {
24 document
.getElementById("notDRT").style
.visibility
= "hidden";
26 testRunner
.dumpAsText();
28 document
.getElementById("selectElement").focus();
30 shouldBeTrue('accessibilityController.focusedElement.isEnabled');
31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isEnabled');
32 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isEnabled');
33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isEnabled');
34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(3).isEnabled');
35 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(4).isEnabled');