3 This test ensures the cross iframe traversal correctness of Spatial Navigation
4 algorithm: focusable elements in an <iframe> should be accessible even when
5 the current focused element is in another <iframe> in the same page.
8 1) DRT support for SNav enable/disable.
11 1) Loads this page, focus goes to "start" automatically.
12 2) Focus moves along the elements in the two iframes in the
13 Web page, eventually going to outer an southward link, but
14 going back to the iframe on the top later on.
17 <script src=
"../../resources/js-test.js"></script>
18 <script src=
"resources/spatial-navigation-utils.js"></script>
19 <script type=
"application/javascript">
43 if (window.testRunner) {
44 testRunner.dumpAsText();
45 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
46 window.internals.settings.setSpatialNavigationEnabled(true);
47 testRunner.waitUntilDone();
52 // starting the test itself: get to a known place.
53 document.getElementById(
"start").focus();
55 initTest(resultMap, testCompleted);
58 function testCompleted()
60 if (window.testRunner)
61 testRunner.notifyDone();
64 window.onload = runTest;
67 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
68 <div><a id=
"start" href=
"a"><img src=
"resources/green.png" width=
30 height=
30></a></div>
70 <iframe width=
"80" height=
"80" scrolling=
"auto" src=
"data:text/html,
72 <a id='1' href='a'><img src='no_image' width=30 height=30></a>
74 <img src='no_image' width=50 height=300>
75 <a id='2' href='a'><img src='no_image' width=30 height=30></a>
80 <div><a id=
"end" href=
"a"><img src=
"resources/green.png" width=
30 height=
30></a></div>
81 <div id=
"console"></div>