3 This test ensures the content overflow traversal correctness of Spatial Navigation
4 algorithm: focusable elements in an scrollable containers (e.g. <div>) should be
5 accessible, including offscreen content.
8 1) DRT support for SNav enable/disable.
11 1) Loads this page, focus goes to "start" automatically.
12 2) Move focus down to the visible focusable element in
14 3) Traverse the page through other focusable elements down the page.
17 * Expected results: All focusable element in scrollable content, including
18 offscreen ones, should be accessible via SNav. -->
20 <style type=
"text/css">
27 <script src=
"../../resources/js-test.js"></script>
28 <script src=
"resources/spatial-navigation-utils.js"></script>
29 <script type=
"application/javascript">
36 if (window.testRunner) {
37 testRunner.dumpAsText();
38 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
39 window.internals.settings.setSpatialNavigationEnabled(true);
40 testRunner.waitUntilDone();
45 // starting the test itself: get to a known place.
46 document.getElementById(
"start").focus();
48 initTest(resultMap, testCompleted);
51 function testCompleted()
53 if (window.testRunner)
54 testRunner.notifyDone();
57 window.onload = runTest;
63 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
65 <div style=
"margin-left:120px">
66 <a id=
"off" class=
"offscreen" href=
"a">offscreen content
</a>
67 <a id=
"start" href=
"a">Right link
</a>
69 <a id=
"1" href=
"a">Down link
</a><br>
70 <div id=
"console"></div>