3 This test ensures the basic iframe traversal correctness of Spatial Navigation
4 algorithm: focusable elements in a <iframe> should be accessible.
7 1) DRT support for SNav enable/disable.
10 1) Loads this page, focus goes to "start" automatically.
11 2) Focus moves along the elements in the two iframes in the
12 Web page, eventually going to outer an southward link, but
13 going back to the iframe on the top later on.
16 <script src=
"../../resources/js-test.js"></script>
17 <script src=
"resources/spatial-navigation-utils.js"></script>
18 <script type=
"application/javascript">
38 if (window.testRunner) {
39 testRunner.dumpAsText();
40 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
41 window.internals.settings.setSpatialNavigationEnabled(true);
42 testRunner.waitUntilDone();
47 // starting the test itself: get to a known place.
48 document.getElementById(
"start").focus();
50 initTest(resultMap, testCompleted);
53 function testCompleted()
55 if (window.testRunner)
56 testRunner.notifyDone();
59 window.onload = runTest;
62 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
63 <div><a id=
"start" href=
"a">a
</a></div>
65 <iframe src=
"data:text/html,
67 <a id='1' href='a'>b</a><br>
68 <a id='2' href='a'>c</a><br>
69 <a id='3' href='a'>d</a><br>
70 <div style='margin-left:80px'>
71 <a id='7' href='a'>e</a>
76 <iframe src=
"data:text/html,
78 <a id='4' href='a'>g</a>
79 <a id='5' href='a'>h</a>
80 <a id='6' href='a'>i</a>
84 <a id=
"end" href=
"a">a
</a>
85 <div id=
"console"></div>