chromium/third_party/blink/web_tests/accessibility/listbox-enabled-states.html

<html>
<head>
    <script src="../resources/js-test.js"></script>
</head>

<body id="body">

<select id="selectElement" multiple title="selectElement">
    <option SELECTED>Option 1</option>
    <option>Option 2</option>
    <option DISABLED>Option 3</option>
    <option aria-disabled="true">Option 4</option>
    <option aria-disabled="false">Option 5</option>
</select>

<p>This tests that we report the correct enabled state on a listbox.</p>

<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>

<p id="console"></p>

<script>
    if (window.testRunner && window.accessibilityController) {
        document.getElementById("notDRT").style.visibility = "hidden";

        testRunner.dumpAsText();

        document.getElementById("selectElement").focus();

        var axSelectElement = accessibilityController.focusedElement;
        shouldBeEqualToString('axSelectElement.restriction', 'none');
        shouldBeEqualToString('axSelectElement.childAtIndex(0).isIgnored', true);
        shouldBeEqualToString('axSelectElement.childAtIndex(0).childAtIndex(0).restriction', 'none');
        shouldBeEqualToString('axSelectElement.childAtIndex(0).childAtIndex(1).restriction', 'none');
        shouldBeEqualToString('axSelectElement.childAtIndex(0).childAtIndex(2).restriction', 'disabled');
        shouldBeEqualToString('axSelectElement.childAtIndex(0).childAtIndex(3).restriction', 'disabled');
        shouldBeEqualToString('axSelectElement.childAtIndex(0).childAtIndex(4).restriction', 'none');
    }
</script>

</body>
</html>