Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-not-rightof.html
blob8d9cf9ff7a56837366780090090288601ef019ae
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: 100px;
10 width: 100px;
11 border: 1px solid black;
13 #e1 {
14 left: 10px;
15 top: 210px;
17 #e2 {
18 left: 60px;
19 top: 330px;
21 #e3 {
22 left: 60px;
23 top: 450px;
24 width: 150px;
26 </style>
27 <body id="some-content" onload="runTest()">
28 <p id="description"></p>
29 <div id="elements">
30 <a id="e1" href="#e1">Element 1</a>
31 <a id="e2" href="#e2">Element 2</a>
32 <a id="e3" href="#e3">Element 3</a>
33 </div>
34 <div id="console"></div>
35 <script type="application/javascript">
36 description('This test ensures that e2 is NOT right of e1 and e3 is NOT right of e2.');
38 jsTestIsAsync = true;
40 var resultMap = [
41 ["Right", "e1"],
42 ["Down", "e2"],
43 ["Right", "e2"],
44 ["Down", "e3"],
45 ["Left", "e3"],
46 ["Up", "e2"],
47 ["Left", "e2"],
48 ["Up", "e1"],
49 ["DONE", "DONE"]
52 if (window.testRunner) {
53 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
54 window.internals.settings.setSpatialNavigationEnabled(true);
57 function runTest()
59 // starting the test itself: get to a known place.
60 document.getElementById("e1").focus();
62 initTest(resultMap, finishJSTest);
64 </script>
65 </body>
66 </html>