blob: 872974daeb6baed61204eaaa48035b34413e4415 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<style>
.hidden {
height: 0;
overflow: hidden;
}
</style>
<div class="hidden">
<h1><a id="hidden-link" tabindex=0 href="http://domain.com/path/i-am-the-URL?id=1234">I am the hidden link text.</a></h1>
</div>
<hr>
<div>
<h1><a id="visible-link" tabindex=0 href="http://domain.com/path/i-am-the-URL?id=1234">I am the visible link text.</a></h1>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that even if an element is not visible, textUnderElement() will still give the text.");
if (window.accessibilityController) {
var hiddenLink = accessibilityController.accessibleElementById("hidden-link");
shouldBe("hiddenLink.title", "'AXTitle: I am the hidden link text.'");
var visibleLink = accessibilityController.accessibleElementById("visible-link");
shouldBe("visibleLink.title", "'AXTitle: I am the visible link text.'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>