blob: c2d16bc31728a3baf6a05307fefb50b0ffcdda30 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="content" tabindex="0">
<div id="text1">
a <div role="img" aria-label="blah" style="background-color: #aaaaaa; width: 100px; height: 100px; display:inline-block;"></div> b
</div>
<br>
<div id="text2">
c <img src="#" aria-label="blah" style="background-color: #aaaaaa; width: 100px; height: 100px;"> d
</div>
</div>
<div id="console"></div>
<script>
description("This tests ensures that if an ARIA image is used it will emit an object replacement character in a range for string operation.")
if (window.testRunner && window.accessibilityController) {
var text1 = accessibilityController.accessibleElementById("text1");
var textMarkerRange = text1.textMarkerRangeForElement(text1);
shouldBe("text1.textMarkerRangeLength(textMarkerRange)", "5");
debug("Object string for range: " + text1.stringForTextMarkerRange(textMarkerRange));
var text2 = accessibilityController.accessibleElementById("text2");
textMarkerRange = text2.textMarkerRangeForElement(text2);
shouldBe("text1.textMarkerRangeLength(textMarkerRange)", "5");
debug("Object string for range: " + text2.stringForTextMarkerRange(textMarkerRange));
document.getElementById("content").style.visibility = 'hidden';
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>