blob: 21c0d3354e92c7fae39935f3dd8bfec35fc79dfd [file] [log] [blame]
This test ensures that overflowed content can be focused by Spatial Navigation.
* Pre-conditions:
1) DRT support for SNav enable/disable.
* Navigation steps:
1) Loads this page, focus goes to "start" automatically.
3) Try to traverse the links on page down.
and then back up.
* Expected results: After 'start' gets the focus, tapping down arrow should scroll its
enclosing scrollable container (<div>) down, and *not* move focus to the link whose id is '2'.
<style type="text/css">
div.scroll {
height: 200px;
width: 300px;
overflow: auto;
border: 1px solid #666;
background-color: #ccc;
padding: 8px;
<script src="../js/resources/js-test-pre.js"></script>
<script src="resources/spatial-navigation-utils.js"></script>
<script type="application/javascript">
var resultMap = [
["Down", "start"],
["DONE", "DONE"]
if (window.testRunner) {
testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
function runTest()
// starting the test itself: get to a known place.
initTest(resultMap, testCompleted);
function testCompleted()
if (window.testRunner)
window.onload = runTest;
<script src="js/resources/js-test-post.js"></script>
<body id="some-content" xmlns="">
<div class="scroll">
<p>It has a visible <a id="start" href="a">link_1</a>.</p>
<p>... and an overflowed link like <a id="1" href="a">this</a>.</p>
<p>This link should NOT get <a id="start" href="a">focused</a>.</p>
<div id="console"></div>