| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/accessibility-helper.js"></script> |
| <script src="../resources/js-test.js"></script> |
| </head> |
| <body> |
| |
| <div id="textless-div" role="group"> |
| <input type="text" /> |
| </div> |
| |
| <div id="text-div"> |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| test test test test test test test test test test test test test test test test test test test test test test test test test test test test |
| </div> |
| |
| <script> |
| var testOutput = "This tests that visibleCharacterRange returns expected visible ranges.\n\n"; |
| |
| if (window.accessibilityController) { |
| const textlessDiv = accessibilityController.accessibleElementById("textless-div") |
| testOutput += `Range of text-less div: ${textlessDiv.stringDescriptionOfAttributeValue("AXVisibleCharacterRange")}\n`; |
| |
| const text = accessibilityController.accessibleElementById("text-div").childAtIndex(0); |
| testOutput += `Range of text div with default view size: ${text.stringDescriptionOfAttributeValue("AXVisibleCharacterRange")}\n`; |
| |
| testOutput += visibleRange(text, {width: 0, height: 500, scrollTop: 0}); |
| testOutput += visibleRange(text, {width: 500, height: 0, scrollTop: 0}); |
| testOutput += visibleRange(text, {width: 1, height: 500, scrollTop: 0}); |
| testOutput += visibleRange(text, {width: 500, height: 1, scrollTop: 0}); |
| testOutput += visibleRange(text, {width: 80, height: 80, scrollTop: 0}); |
| testOutput += visibleRange(text, {width: 500, height: 200, scrollTop: 0}); |
| |
| debug(testOutput); |
| document.getElementById("text-div").style.visibility = "hidden"; |
| } |
| </script> |
| |
| </body> |
| </html> |