blob: 99ce32cd6b3d1e10a6c5b54a246883764ba49f5a [file] [log] [blame]
This test ensures the cross iframe traversal correctness of spatial navigation:
focusable elements in nested inner frame should be accessible.
* Pre-conditions:
1) DRT support for spatial navigation enable/disable.
* Navigation steps:
1) Loads this page, focus goes to "start" automatically.
2) Focus moves along the elements in the two level deep nested frame,
but going back to the main frame later on.
<script src="../js/resources/js-test-pre.js"></script>
<script src="resources/spatial-navigation-utils.js"></script>
<script type="application/javascript">
var resultMap = [
["Right", "1"],
["Right", "2"],
["Right", "3"],
["Right", "4"],
["Right", "5"],
["Right", "6"],
["Right", "7"],
["Right", "8"],
["Right", "9"],
["Left", "8"],
["Left", "7"],
["Left", "6"],
["Left", "5"],
["Left", "4"],
["Left", "3"],
["Left", "2"],
["Left", "1"],
["Left", "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>
<table style="text-align: top;" border="0" cellpadding="3px" cellspacing="3px">
<td valign="top" width="10%">
<a id="start" href="#">Link</a><br>
<td valign="top">
<iframe width="50%" height="100px" frameborder="1" src="resources/iframe.html"></iframe><br>
<td valign="top" width="10%">
<a id="9" href="#">Link</a><br>
<td valign="top" width="10%">
<a id="10" href="#">Link</a><br>
<td valign="top">
<p><a id="11" href="#">Here</a> is a link.</p>
<td valign="top" width="10%">
<a id="12" href="#">Link</a><br>
<div id="console"></div>