Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-imagemap-overlapped-areas.html
blob2fd44338256ccb43b35dc3efcfbcb083efef1d29
1 <html>
2 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/spatial-navigation-utils.js"></script>
6 <script type="application/javascript">
8 var resultMap = [
9 ["Down", "4"],
10 ["Down", "1"],
11 ["Down", "2"],
12 ["Down", "5"],
13 ["Up", "4"],
14 ["Up", "3"],
15 ["Up", "2"],
16 ["Left", "1"],
17 ["Right", "3"],
18 ["Left", "2"],
19 ["Up", "1"],
20 ["Up", "start"],
21 ["DONE", "DONE"]
24 if (window.testRunner) {
25 testRunner.dumpAsText();
26 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
27 window.internals.settings.setSpatialNavigationEnabled(true);
28 testRunner.waitUntilDone();
31 function runTest()
33 // starting the test itself: get to a known place.
34 document.getElementById("start").focus();
36 initTest(resultMap, testCompleted);
39 function testCompleted()
41 if (window.testRunner)
42 testRunner.notifyDone();
45 window.onload = runTest;
47 </script>
48 </head>
50 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
51 <map name="map" title="map" id="firstmap">
52 <area shape="circle" coords="45,45,25" href="#" id="1">
53 <area shape="rect" coords="45,60,95,110" href="#" id="2">
54 <area shape="poly" coords="80,20,130,20,130,180,30,180,30,130,80,130" href="#" id="3">
55 <area shape="default" href="#" id="4">
56 </map>
58 <a id="start" href="a"><img src="resources/green.png" width=50px height=50px></a>
59 <div>
60 <img src="resources/green.png" width=200px height=200px usemap="#map">
61 </div>
62 <a id="5" href="a"><img src="resources/green.png" width=50px height=50px></a>
63 <div id="console"></div>
64 <div>This test tests that areas of an imagemap can be reached with spatial navigation even if they are overlapped.</div>
65 </body>
66 </html>