blob: de96fa43220f95a4f43c216eae33a53eefec0eb0 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<style>
.fakeImage {
border: 1px solid black;
width: 100px;
height: 100px;
};
</style>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div role="img" aria-label="test" id="image1" class="fakeImage">inside</div>b
<div id="console"></div>
<script>
description("This tests object replacements are present in strings when the replaced element is at the beginning of the document and there are rendered children")
if (window.testRunner && window.accessibilityController) {
var body = accessibilityController.rootElement.childAtIndex(0);
var start = body.startTextMarker;
var end = body.endTextMarker;
var textMarkerRange = body.textMarkerRangeForMarkers(start, end);
var text = body.stringForTextMarkerRange(textMarkerRange);
var replace = text.replace(String.fromCharCode(65532), "[ATTACHMENT]");
debug("Object string for BODY range: " + replace);
// Hide extraneous content.
var array = document.getElementById("console").parentNode.childNodes;
while (array[0] != document.getElementById("console"))
array[0].parentNode.removeChild(array[0]);
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>