Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / accessibility / image-map1.html
1 <html>
2 <head>
3 <script src="../resources/js-test.js"></script>
4 </head>
5 <script>
6     if (window.testRunner)
7         testRunner.dumpAsText();
8 </script>
9 <body id="body">
10     
11     <!-- Test image map -->
12     <map id="apple" name="imagemap1">
13       <area shape="rect" coords="10,10,133,72" href="http://www.apple.com" title="Link1" />
14       <area shape="rect" coords="12,74,134,88" href="http://www.apple.com" title="Link2" />
15       <area shape="rect" coords="11,91,133,105" href="http://www.apple.com" title="Link3" />
16       <area shape="default" nohref="nohref" alt="" />
17     </map>
18
19     <img src="resources/cake.png"  border="0" align="left" usemap="#imagemap1" vspace="1">
20
21 <p id="description"></p>
22 <div id="console"></div>
23      
24     <script>
25         description("This tests that you can reach the links within an image map.");
26
27         if (window.accessibilityController) {
28             document.getElementById("body").focus();
29
30             var body = accessibilityController.focusedElement;
31             shouldBe("body.childAtIndex(3).role", "'AXRole: AXLink'");
32             shouldBe("body.childAtIndex(3).title", "'AXTitle: Link1'");
33
34             shouldBe("body.childAtIndex(4).role", "'AXRole: AXLink'");
35             shouldBe("body.childAtIndex(4).title", "'AXTitle: Link2'");
36
37             shouldBe("body.childAtIndex(5).role", "'AXRole: AXLink'");
38             shouldBe("body.childAtIndex(5).title", "'AXTitle: Link3'");
39         }
40 </script>
41
42 </body>
43 </html>