Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-iframe-nested.html
blob33ef0a7a258c66f029dceec1bfc84cceed4eaec4
1 <html>
2 <!--
3 This test ensures the cross iframe traversal correctness of spatial navigation:
4 focusable elements in nested inner frame should be accessible.
6 * Pre-conditions:
7 1) DRT support for spatial navigation enable/disable.
9 * Navigation steps:
10 1) Loads this page, focus goes to "start" automatically.
11 2) Focus moves along the elements in the two level deep nested frame,
12 but going back to the main frame later on.
13 -->
14 <head>
15 <script src="../../resources/js-test.js"></script>
16 <script src="resources/spatial-navigation-utils.js"></script>
17 <script type="application/javascript">
19 var resultMap = [
20 ["Right", "1"],
21 ["Right", "2"],
22 ["Right", "3"],
23 ["Right", "4"],
24 ["Right", "5"],
25 ["Right", "6"],
26 ["Right", "7"],
27 ["Right", "8"],
28 ["Right", "9"],
29 ["Left", "8"],
30 ["Left", "7"],
31 ["Left", "6"],
32 ["Left", "5"],
33 ["Left", "4"],
34 ["Left", "3"],
35 ["Left", "2"],
36 ["Left", "1"],
37 ["Left", "start"],
38 ["DONE", "DONE"]
41 if (window.testRunner) {
42 testRunner.dumpAsText();
43 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
44 window.internals.settings.setSpatialNavigationEnabled(true);
45 testRunner.waitUntilDone();
48 function runTest()
50 // starting the test itself: get to a known place.
51 document.getElementById("start").focus();
53 initTest(resultMap, testCompleted);
56 function testCompleted()
58 if (window.testRunner)
59 testRunner.notifyDone();
62 window.onload = runTest;
63 </script>
64 </head>
65 <body>
66 <table style="text-align: top;" border="0" cellpadding="3px" cellspacing="3px">
67 <tr>
68 <td valign="top" width="10%">
69 <a id="start" href="#">Link</a><br>
70 </td>
71 <td valign="top">
72 <iframe width="50%" height="100px" frameborder="1" src="resources/iframe.html"></iframe><br>
73 </td>
74 <td valign="top" width="10%">
75 <a id="9" href="#">Link</a><br>
76 </td>
77 </tr>
78 <tr>
79 <td valign="top" width="10%">
80 <a id="10" href="#">Link</a><br>
81 </td>
82 <td valign="top">
83 <p><a id="11" href="#">Here</a> is a link.</p>
84 </td>
85 <td valign="top" width="10%">
86 <a id="12" href="#">Link</a><br>
87 </td>
88 </tr>
89 </table>
90 <div id="console"></div>
91 </body>
92 </html>