3 This test ensures the correctness of a basic aspect of spatial navigation traversal
4 routines: focusable elements in scrollable containers (e.g. <div>) should be
5 accessible, including offscreen content.
8 1) DRT support for spatial navivation 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 spatial navigation. -->
21 :focus {outline:
1px solid black;}
23 <script src=
"../../resources/js-test.js"></script>
24 <script src=
"resources/spatial-navigation-utils.js"></script>
25 <script type=
"application/javascript">
33 if (window.testRunner) {
34 testRunner.dumpAsText();
35 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
36 window.internals.settings.setSpatialNavigationEnabled(true);
37 testRunner.waitUntilDone();
42 // starting the test itself: get to a known place.
43 document.getElementById(
"start").focus();
45 initTest(resultMap, testCompleted);
48 function testCompleted()
50 if (window.testRunner)
51 testRunner.notifyDone();
54 window.onload = runTest;
59 <a href=
"#" id=
"start">This is an element
</a><br>
67 <a href=
"#" id=
"2">This is an element
</a><br>
69 <div id=
"console"></div>
70 <div>This test tests that a anchor element with only white spaces gives the correct size in ContainerNode::getRect().
</div>