blob: 97b79385cc9840db0b7e613e7cc085fc1e06b89c [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script src="resources/spatial-navigation-utils.js"></script>
body a {
position: absolute;
height: 100px;
width: 100px;
border: 1px solid black;
#e1 {
left: 10px;
top: 210px;
#e2 {
left: 60px;
top: 330px;
#e3 {
left: 60px;
top: 450px;
width: 150px;
<body id="some-content" onload="runTest()">
<p id="description"></p>
<div id="elements">
<a id="e1" href="#e1">Element 1</a>
<a id="e2" href="#e2">Element 2</a>
<a id="e3" href="#e3">Element 3</a>
<div id="console"></div>
<script type="application/javascript">
description('This test ensures that e2 is NOT right of e1 and e3 is NOT right of e2.');
jsTestIsAsync = true;
var resultMap = [
["Right", "e1"],
["Down", "e2"],
["Right", "e2"],
["Down", "e3"],
["Left", "e3"],
["Up", "e2"],
["Left", "e2"],
["Up", "e1"],
["DONE", "DONE"]
if (window.testRunner) {
testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1);
function runTest()
// starting the test itself: get to a known place.
initTest(resultMap, finishJSTest);