Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-aligned-not-aligned.html
blob51f2be6521af1d1cd7c762b060b1c60aaa87d496
1 <!DOCTYPE html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/spatial-navigation-utils.js"></script>
5 </head>
6 <style>
7 body a {
8 position: absolute;
9 height: 50px;
10 width: 100px;
11 border: 1px solid black;
13 #e1 {
14 left: 50px;
15 top: 250px;
17 #e2 {
18 left: 200px;
19 top: 300px;
20 height: 100px;
22 #e3 {
23 left: 350px;
24 top: 300px;
26 #e4 {
27 left: 500px;
28 top: 200px;
29 height: 100px;
31 #e5 {
32 left: 650px;
33 top: 250px;
35 </style>
36 <body id="some-content" onload="runTest()">
37 <p id="description"></p>
38 <div id="elements">
39 <a id="e1" href="#e1">E1</a>
40 <a id="e2" href="#e2">E2</a>
41 <a id="e3" href="#e3">E3</a>
42 <a id="e4" href="#e4">E4</a>
43 <a id="e5" href="#e5">E5</a>
44 </div>
45 <div id="console"></div>
46 <script type="application/javascript">
47 description('This test ensures that Spatial Navigation works with symmetrically positoned rects');
49 jsTestIsAsync = true;
51 var resultMap = [
52 ["Right", "e4"],
53 ["Right", "e5"],
54 ["Left", "e4"],
55 ["Left", "e1"],
56 ["Down", "e2"],
57 ["Right", "e3"],
58 ["Right", "e4"],
59 ["DONE", "DONE"]
62 if (window.testRunner) {
63 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
64 window.internals.settings.setSpatialNavigationEnabled(true);
67 function runTest()
69 // starting the test itself: get to a known place.
70 document.getElementById("e1").focus();
72 initTest(resultMap, finishJSTest);
74 </script>
75 </body>
76 </html>