3 This test ensures that overflowed content can be focused by Spatial Navigation.
6 1) DRT support for SNav enable/disable.
9 1) Loads this page, focus goes to "start" automatically.
10 3) Try to traverse the links on page down.
13 * Expected results: After 'start' gets the focus, tapping down arrow should scroll its
14 enclosing scrollable container (<div>) down, and *not* move focus to the link whose id is '2'.
17 <style type=
"text/css">
22 border: 1px solid
#666;
23 background-color: #ccc;
28 <script src=
"../../resources/js-test.js"></script>
29 <script src=
"resources/spatial-navigation-utils.js"></script>
30 <script type=
"application/javascript">
37 if (window.testRunner) {
38 testRunner.dumpAsText();
39 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
40 window.internals.settings.setSpatialNavigationEnabled(true);
41 testRunner.waitUntilDone();
46 // starting the test itself: get to a known place.
47 document.getElementById(
"start").focus();
49 initTest(resultMap, testCompleted);
52 function testCompleted()
54 if (window.testRunner)
55 testRunner.notifyDone();
58 window.onload = runTest;
63 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
65 <p>It has a visible
<a id=
"start" href=
"a">link_1
</a>.
</p>
66 <br><br><br><br><br><br><br><br><br>
67 <p>... and an overflowed link like
<a id=
"1" href=
"a">this
</a>.
</p>
69 <br><br><br><br><br><br><br>
70 <p>This link should NOT get
<a id=
"start" href=
"a">focused
</a>.
</p>
71 <div id=
"console"></div>