| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../resources/js-test.js"></script> | 3 <script src="../resources/js-test.js"></script> |
| 4 </head> | 4 </head> |
| 5 | 5 |
| 6 <body id="body"> | 6 <body id="body"> |
| 7 | 7 |
| 8 <select id="selectElement" multiple title="selectElement"> | 8 <select id="selectElement" multiple title="selectElement"> |
| 9 <option SELECTED>Option 1</option> | 9 <option SELECTED>Option 1</option> |
| 10 <option>Option 2</option> | 10 <option>Option 2</option> |
| 11 <option DISABLED>Option 3</option> | 11 <option DISABLED>Option 3</option> |
| 12 </select> | 12 </select> |
| 13 | 13 |
| 14 <p>This tests that we report the correct selection-related states.</p> | 14 <p>This tests that we report the correct selection-related states.</p> |
| 15 | 15 |
| 16 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p> | 16 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p> |
| 17 | 17 |
| 18 <p id="console"></p> | 18 <p id="console"></p> |
| 19 | 19 |
| 20 <script> | 20 <script> |
| 21 if (window.testRunner && window.accessibilityController) { | 21 if (window.testRunner && window.accessibilityController) { |
| 22 document.getElementById("notDRT").style.visibility = "hidden"; | 22 document.getElementById("notDRT").style.visibility = "hidden"; |
| 23 | 23 |
| 24 testRunner.dumpAsText(); | 24 testRunner.dumpAsText(); |
| 25 | 25 |
| 26 document.getElementById("selectElement").focus(); | 26 document.getElementById("selectElement").focus(); |
| 27 | 27 |
| 28 shouldBeTrue('accessibilityController.focusedElement.isMultiSelectable')
; | 28 var axSelectElement = accessibilityController.focusedElement; |
| 29 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isS
electable'); | 29 shouldBeTrue('axSelectElement.isMultiSelectable'); |
| 30 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isS
elected'); | 30 shouldBeTrue('axSelectElement.childAtIndex(0).isSelectable'); |
| 31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isS
electable'); | 31 shouldBeTrue('axSelectElement.childAtIndex(0).isSelected'); |
| 32 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(1).is
Selected'); | 32 shouldBeTrue('axSelectElement.childAtIndex(1).isSelectable'); |
| 33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).is
Selectable'); | 33 shouldBeFalse('axSelectElement.childAtIndex(1).isSelected'); |
| 34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).is
Selected'); | 34 shouldBeFalse('axSelectElement.childAtIndex(2).isSelectable'); |
| 35 shouldBeFalse('axSelectElement.childAtIndex(2).isSelected'); |
| 35 } | 36 } |
| 36 </script> | 37 </script> |
| 37 </body> | 38 </body> |
| 38 </html> | 39 </html> |
| OLD | NEW |