OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 function pressTabKey() | |
5 { | |
6 if (window.eventSender) | |
7 eventSender.keyDown("\t"); | |
8 } | |
9 | |
10 function test() { | |
11 if (window.testRunner) | |
12 testRunner.dumpAsText(); | |
13 | |
14 var before = document.getElementById("before"); | |
15 var area = document.getElementById("area"); | |
16 | |
17 before.focus(); | |
18 pressTabKey(); | |
19 | |
20 if (document.activeElement == area) | |
21 res.innerHTML = "Test Passed"; | |
22 } | |
23 </script> | |
24 </head> | |
25 | |
26 <body onload="test()"> | |
27 This tests that pressing Tab focuses areas in an image map even if they're n
ot direct children. | |
28 | |
29 <div id="res">Test Failed</div> | |
30 | |
31 <div id="before" tabIndex=0 /> | |
32 | |
33 <div> | |
34 <map name="imagemap"> | |
35 <div> | |
36 <area id="area" shape="rect" coords="0,0,128,128" href="#dummy"
/> | |
37 </div> | |
38 </map> | |
39 <img width="128" height="128" usemap="#imagemap" ismap /> | |
40 </div> | |
41 | |
42 <div id="after" tabIndex=0 /> | |
43 | |
44 </body> | |
45 </head> | |
46 </html> | |
OLD | NEW |