blob: 60ef23c019145ff177f09d237ea46586511805c5 [file] [log] [blame]
<html>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<body id="body">
<!-- This test makes sure that spacer elements are not returned as elements. There should be at most 4 elements returned -->
<b>First</b>
<b>Second</b>
<a href="http://www.apple.com">Apple</a>
<a href="http://www.yahoo.com">Yahoo</a>
<div id="result"></div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var body = document.getElementById("body");
body.focus();
var container = accessibilityController.focusedElement.childAtIndex(0);
// The Gtk port ATs expect the bold inline text to not have accessible objects.
var expectedCount = (testRunner.platformName == "gtk") ? 2 : 4;
if (container.childrenCount == expectedCount) {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>