[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / tab-crash-with-image-map.html
1 <html>
2 <head>
3     <script>
4
5         function dispatchTabPress(element, shiftKey)
6         {
7             var event = document.createEvent('KeyboardEvents');
8             var tabKeyIdentifier = 'U+0009';
9             event.initKeyboardEvent('keydown', true, true, document.defaultView, tabKeyIdentifier, 0, false, true, shiftKey, false, false);
10             element.dispatchEvent(event);
11         }
12
13         function test()
14         {
15             if (window.layoutTestController) {
16                 layoutTestController.dumpAsText();
17             }
18
19             document.getElementById("link1").focus();
20
21             for (var i = 0; i < 40; ++i) {
22                 dispatchTabPress(document, false);
23             }
24          }
25     </script>
26 </head>
27 <body onload="test()">
28
29   Test passes if there is no crash
30
31   <p><a tabindex="5" id="link1" href="http://www.google.com/">Google (tabindex 5)</a></p>
32
33   <p><a tabindex="2" href="http://www.yahoo.com/">Yahoo (tabindex 2)</a></p>
34
35   <p><img src="resources/cake.png" usemap="#firstmap" alt=
36   "This is a alt text" style="border: 0px none;">
37   <map name="firstmap" title="map" id="firstmap">
38     <area shape="rect" id="upper_left" tabindex="3" coords="12,15,82,86" href=
39     "up_left.htm" title="upper left" alt="Blue rectangle">
40     <area shape="rect" id="middle_middle" tabindex="7" coords="122,103,191,172"
41     href="mid_mid.htm" title="middle middle" alt="Blue rectangle">
42     <area shape="rect" id="lower_middle" coords="121,192,192,261"
43     href="low_mid.htm" alt="Blue rectangle">
44     <area shape="circle" id="upper_middle" coords="157,52,33" href=
45     "up_mid.htm" alt="Red circle">
46     <area shape="circle" id="middle_left" tabindex="1" coords="47,135,33" href=
47     "mid_left.htm" alt="Red circle">
48     <area shape="circle" id="lower_right" coords="259,227,34" href=
49     "low_rt.htm" alt="Red circle">
50     <area shape="poly" id="lower_left" coords=
51     "57,198,23,221,23,241,58,265,93,241,93,221" href="low_left.htm" alt="Yellow hexagon">
52     <area shape="poly" id="middle_right" coords=
53     "264,106,232,127,230,148,264,171,298,148,298,126" href="mid_rt.htm" alt="Yellow hexagon">
54     <area shape="poly" id="upper_right" coords=
55     "261,18,226,41,226,59,263,85,295,59,296,38" href="up_rt.htm" alt="Yellow hexagon">
56     <area shape="poly" id="left_brown" coords=
57     "89,8,89,156,5,193,9,223,63,190,97,214,97,246,62,274,109,275,109,98,140,97"
58     href="left_brn.htm" alt="Brown polygon">
59     <area shape="poly" id="top_brown" coords="94,4,105,22,166,11,164,5" href=
60     "top_brn.htm" alt="Brown polygon">
61     <area shape="poly" id="right_brown" coords=
62     "168,5,169,11,194,33,194,257,265,283,265,270,220,247,220,200,255,179,227,158,227,123,265,98,221,68,220,36,269,6"
63     href="rt_brn.htm" alt="Brown polygon">
64     <area shape="default" href="default.htm" alt="foo">
65   </map></p>
66
67   <p><a href="http://www.google.com/" tabindex="4">Google (tabindex 4)</a></p>
68
69   <p><a href="http://www.yahoo.com/" tabindex="6">Yahoo (tabindex 6)</a></p>
70 </body>
71 </html>
72