blob: c827ad13f7d2f99403409c085e71198a44b97e54 [file] [log] [blame] [edit]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/accessibility-helper.js"></script>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div>
<!-- <div> is added to break text stitching, so the test passes with and without accessibility text-stitching enabled. -->
<abbr role="group" id="abbr" title="a">Foo</abbr>
</div>
<acronym role="group" id="acronym" title="b">Bar</acronym>
<script>
var output = "This test ensures we represent expanded text in attributed strings.\n\n";
if (window.accessibilityController) {
var abbrText = accessibilityController.accessibleElementById("abbr").childAtIndex(0);
var markerRange = abbrText.textMarkerRangeForElement(abbrText);
output += expect("abbrText.attributedStringForTextMarkerRangeContainsAttribute('AXExpandedTextValue', markerRange)", "true");
var acronymText = accessibilityController.accessibleElementById("acronym").childAtIndex(0);
var markerRange = acronymText.textMarkerRangeForElement(acronymText);
output += expect("acronymText.attributedStringForTextMarkerRangeContainsAttribute('AXExpandedTextValue', markerRange)", "true");
debug(output);
}
</script>
</body>
</html>