blob: a1fe4177b759ee4f1cb4ee0300367d575c04c68d [file] [log] [blame]
This test ensures the cross iframe traversal correctness of Spatial Navigation
algorithm: focusable elements in an <iframe> should be accessible even when
the current focused element is in another <iframe> in the same page.
* Pre-conditions:
1) DRT support for SNav enable/disable.
* Navigation steps:
1) Loads this page, focus goes to "start" automatically.
2) Focus moves along the elements in the two iframes in the
Web page, eventually going to outer an southward link, but
going back to the iframe on the top 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 = [
["Down", "1"],
["Down", "1"],
["Down", "1"],
["Down", "1"],
["Down", "1"],
["Down", "1"],
["Down", "1"],
["Down", "2"],
["Down", "end"],
["Up", "2"],
["Up", "2"],
["Up", "2"],
["Up", "2"],
["Up", "2"],
["Up", "2"],
["Up", "2"],
["Up", "1"],
["Up", "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><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
<iframe width="80" height="80" scrolling="auto" src="data:text/html,
<a id='1' href='a'><img src='no_image' width=30 height=30></a>
<img src='no_image' width=50 height=300>
<a id='2' href='a'><img src='no_image' width=30 height=30></a>
<div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
<div id="console"></div>