commit-queue@webkit.org | 0257f0fd | 2012-12-10 17:30:23 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 3 | <script src="../resources/js-test-pre.js"></script> |
commit-queue@webkit.org | 0257f0fd | 2012-12-10 17:30:23 +0000 | [diff] [blame] | 4 | </head> |
| 5 | |
| 6 | <body id="body"> |
| 7 | |
| 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> |
| 14 | </select> |
| 15 | |
| 16 | <p>This tests that we report the correct enabled state on a listbox.</p> |
| 17 | |
| 18 | <p id="notDRT">This test should only be run inside of DumpRenderTree.</p> |
| 19 | |
| 20 | <p id="console"></p> |
| 21 | |
| 22 | <script> |
| 23 | if (window.testRunner && window.accessibilityController) { |
| 24 | document.getElementById("notDRT").style.visibility = "hidden"; |
| 25 | |
| 26 | testRunner.dumpAsText(); |
| 27 | |
| 28 | document.getElementById("selectElement").focus(); |
| 29 | |
| 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'); |
| 36 | } |
| 37 | </script> |
| 38 | |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 39 | <script src="../resources/js-test-post.js"></script> |
commit-queue@webkit.org | 0257f0fd | 2012-12-10 17:30:23 +0000 | [diff] [blame] | 40 | </body> |
| 41 | </html> |