blob: b19498b5aba48733bd3cb527d935e709b40b72d5 [file] [log] [blame]
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<body id="body">
<!-- Test image map -->
<map id="apple" name="imagemap1">
<area shape="rect" coords="10,10,133,72" href="http://www.apple.com" title="Link1" />
<area shape="rect" coords="12,74,134,88" href="http://www.apple.com" title="Link2" />
<area shape="rect" coords="11,91,133,105" href="http://www.apple.com" title="Link3" />
<area shape="default" nohref="nohref" alt="" />
</map>
<img src="resources/cake.png" border="0" align="left" usemap="#imagemap1" vspace="1">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that you can reach the links within an image map.");
if (window.accessibilityController) {
document.getElementById("body").focus();
var body = accessibilityController.focusedElement;
shouldBe("body.childAtIndex(0).role", "'AXRole: AXLink'");
shouldBe("body.childAtIndex(0).name", "'Link1'");
shouldBe("body.childAtIndex(1).role", "'AXRole: AXLink'");
shouldBe("body.childAtIndex(1).name", "'Link2'");
shouldBe("body.childAtIndex(2).role", "'AXRole: AXLink'");
shouldBe("body.childAtIndex(2).name", "'Link3'");
}
</script>
</body>
</html>