blob: e27f644e8474f9ede4f2dcbb7e5919edb35307ed [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"></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 has no 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>