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>
14 <p>This tests that we report the correct selection-related states.
</p>
16 <p id=
"notDRT">This test should only be run inside of DumpRenderTree.
</p>
21 if (window
.testRunner
&& window
.accessibilityController
) {
22 document
.getElementById("notDRT").style
.visibility
= "hidden";
24 testRunner
.dumpAsText();
26 document
.getElementById("selectElement").focus();
28 shouldBeTrue('accessibilityController.focusedElement.isMultiSelectable');
29 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelectable');
30 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelected');
31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isSelectable');
32 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(1).isSelected');
33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelectable');
34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelected');