Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / images / imagemap-nested-area.html
blob642e4e89879a626404e9d901d23a568f201134a5
1 <html>
2 <head>
3 <script>
4 function pressTabKey()
6 if (window.eventSender)
7 eventSender.keyDown("\t");
10 function test() {
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 var before = document.getElementById("before");
15 var area = document.getElementById("area");
17 before.focus();
18 pressTabKey();
20 if (document.activeElement == area)
21 res.innerHTML = "Test Passed";
23 </script>
24 </head>
26 <body onload="test()">
27 This tests that pressing Tab focuses areas in an image map even if they're not direct children.
29 <div id="res">Test Failed</div>
31 <div id="before" tabIndex=0 />
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>
42 <div id="after" tabIndex=0 />
44 </body>
45 </head>
46 </html>