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="../js/resources/js-test-pre.js"></script>
18 <script src="resources/spatial-navigation-utils.js"></script>
19 <script type="application/javascript">
43 if (window.layoutTestController) {
44 layoutTestController.dumpAsText();
45 layoutTestController.setSpatialNavigationEnabled(true);
46 layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
47 layoutTestController.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.layoutTestController)
61 layoutTestController.notifyDone();
64 window.onload = runTest;
66 <script src="js/resources/js-test-post.js"></script>
68 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
69 <div><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
71 <iframe width="80" height="80" scrolling="auto" src="data:text/html,
73 <a id='1' href='a'><img src='no_image' width=30 height=30></a>
75 <img src='no_image' width=50 height=300>
76 <a id='2' href='a'><img src='no_image' width=30 height=30></a>
81 <div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
82 <div id="console"></div>