c25c2d798855a5d484c5aa173ac3778b7a2a7d4b
[WebKit-https.git] / LayoutTests / accessibility / crashing-a-tag-in-map.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script>
5 var successfullyParsed = false;
6 </script>
7 <script src="../fast/js/resources/js-test-pre.js"></script>
8 </head>
9 <body id="body">
10
11 <div class="body">
12
13 <img src="resources/cake.png" height="500" width="613" border="0" usemap="#img">
14 <map id="img" name="img">
15 <area shape="rect" coords="97,45,5,5" href="test.html" alt="">
16 <area shape="rect" coords="447,45,5,5" href="test.html">
17 <a href="test.html"></a>
18 <area shape="default" nohref="nohref" alt="">
19 </map></div>
20
21 <p id="description"></p>
22 <div id="console"></div>
23
24 <script>
25
26     description("This tests that a hit test on a image map that has areas and anchors does not crash");
27
28     if (window.accessibilityController) {
29
30           var body = document.getElementById("body");
31           body.focus();
32
33           // test fails if it crashes here
34           var control = accessibilityController.focusedElement.elementAtPoint(100, 100);
35     }
36
37     successfullyParsed = true;
38 </script>
39
40 <script src="../fast/js/resources/js-test-post.js"></script>
41 </body>
42 </html>