| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body id="body"> |
| |
| <ol> |
| <li>test |
| </ol> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests makes sure that the list marker text is included when the text is asked for."); |
| |
| if (window.accessibilityController) { |
| |
| // this text field should be required. |
| document.getElementById("body").focus(); |
| var webArea = accessibilityController.focusedElement.childAtIndex(0); |
| var testObject = webArea.childAtIndex(0); |
| |
| // If AX lists are enabled, the AX hierarchy looks like AXWebArea->AXList->AXGroup->{ AXListMarker, AXStaticText } |
| // If AX lists are not enabled, the hierarchy looks like AXWebArea->AXGroup->{ AXListMarker, AXStaticText } |
| // The following test works with both forms. |
| if (testObject.role == "AXRole: AXGroup") { |
| testObject = testObject.childAtIndex(1); |
| } else if (testObject.role == "AXRole: AXListMarker") { |
| testObject = webArea.childAtIndex(1); |
| } |
| |
| var string = testObject.stringForRange(0,4); |
| var succeeded = string == "1. test"; |
| shouldBe("succeeded", "true"); |
| } |
| |
| </script> |
| |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |