blob: 2cf0c317b1cf35c189c49adf8e74f487a4850264 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<a href="#" aria-haspopup="true" tabindex="0" id="link1">Link 1</a>
<a href="#" aria-haspopup="false" tabindex="0" id="link2">Link 2</a>
<a href="#" aria-haspopup="true" tabindex="0" id="link3">
<p id="paragraph1">Paragraph 1.</p>
</a>
<a href="#" aria-haspopup="false" tabindex="0" id="link4">
<p id="paragraph2">Paragraph 2.</p>
</a>
<a href="#" tabindex="0" id="link5">
<p id="paragraph3">Paragraph 3.</p>
</a>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that an element will report that it has a popup correctly.");
if (window.accessibilityController) {
document.getElementById("link1").focus();
shouldBe("accessibilityController.focusedElement.hasPopup", "true");
document.getElementById("link2").focus();
shouldBe("accessibilityController.focusedElement.hasPopup", "false");
var p1 = accessibilityController.accessibleElementById("paragraph1");
shouldBe("p1.hasPopup", "true");
var p2 = accessibilityController.accessibleElementById("paragraph2");
shouldBe("p2.hasPopup", "false");
var p3 = accessibilityController.accessibleElementById("paragraph3");
shouldBe("p3.hasPopup", "false");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>