blob: 0837a1ef0ee89bde8ed101edea09efed274f8f45 [file] [log] [blame]
This test ensures the basic iframe traversal correctness of Spatial Navigation
algorithm: focusable elements in a <iframe> should be accessible.
* 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", "2"],
["Down", "3"],
["Down", "7"],
["Down", "6"],
["Down", "end"],
["Up", "4"],
["Right", "5"],
["Right", "6"],
["Up", "3"],
["Right", "7"],
["Up", "3"],
["Up", "2"],
["Up", "1"],
["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">a</a></div>
<iframe src="data:text/html,
<a id='1' href='a'>b</a><br>
<a id='2' href='a'>c</a><br>
<a id='3' href='a'>d</a><br>
<div style='margin-left:80px'>
<a id='7' href='a'>e</a>
<iframe src="data:text/html,
<a id='4' href='a'>g</a>
<a id='5' href='a'>h</a>
<a id='6' href='a'>i</a>
<a id="end" href="a">a</a>
<div id="console"></div>