summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-1st-stop.html
blob: bf0f361ad2784a09631bdfc2baf35a709f23fb46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
  <!--
    This test ensures the correctness of Spatial Navigation (SNav) algorithm from a non-focus scenario.

    * Pre-conditions:
    1) DRT support for SNav enable/disable.

    * Navigation steps:
    1) Loads this page and send key down.
    2) The 1st link should be focused.
  -->
  <head>
    <script src="../js/resources/js-test-pre.js"></script>
    <script src="resources/spatial-navigation-utils.js"></script>
    <script type="application/javascript">

    var resultMap = [
      ["Down", "1"],
      ["DONE", "DONE"]
    ];

    if (window.layoutTestController) {
      layoutTestController.dumpAsText();
      layoutTestController.setSpatialNavigationEnabled(true);
      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
      layoutTestController.waitUntilDone();
    }

    function runTest()
    {
      // starting the test from no focused node.
      initTest(resultMap, testCompleted);
    }

    function testCompleted()
    {
      if (window.layoutTestController)
        layoutTestController.notifyDone();
    }

    window.onload = runTest;

    </script>
    <script src="js/resources/js-test-post.js"></script>
  </head>
  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
      <tbody>
        <tr>
          <td style="vertical-align: top; text-align: center;"><a id="1" href="a">1</a></td>
          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">3</a></td>
        </tr>
        <tr>
          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">5</td>
          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
        </tr>
        <tr>
          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">7</a></td>
          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">9</a></td>
        </tr>
      </tbody>
    </table>
    <div id="console"></div>
  </body>
</html>