blob: 658a38d0d7445ad85e003d6ecf5e19dc11195e6d [file] [log] [blame]
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<iframe id='iframe1' scrolling=YES width=100 height=100 border=1 src='resources/cake.png'></iframe>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that the AX parent chain hierarchy with iframes is correct");
if (window.accessibilityController) {
var body = document.getElementById("body");
body.focus();
var webArea = accessibilityController.focusedElement;
var group1 = webArea.childAtIndex(0);
var iframeScrollArea = group1.childAtIndex(0);
var iframeWebArea = iframeScrollArea.childAtIndex(0);
var parentIframeWebArea = iframeWebArea.parentElement();
var parentIframeScrollArea = parentIframeWebArea.parentElement();
var parentGroup1 = parentIframeScrollArea.parentElement();
shouldBe("parentIframeWebArea.isEqual(iframeScrollArea)", "true");
shouldBe("parentIframeScrollArea.isEqual(group1)", "true");
shouldBe("parentGroup1.isEqual(webArea)", "true");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>