Git init
[framework/web/webkit-efl.git] / LayoutTests / fast / spatial-navigation / snav-iframe-nested.html
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.
5
6     * Pre-conditions:
7     1) DRT support for spatial navigation enable/disable.
8
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="../js/resources/js-test-pre.js"></script>
16     <script src="resources/spatial-navigation-utils.js"></script>
17     <script type="application/javascript">
18
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"]
39     ];
40
41     if (window.layoutTestController) {
42       layoutTestController.dumpAsText();
43       layoutTestController.setSpatialNavigationEnabled(true);
44       layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
45       layoutTestController.waitUntilDone();
46     }
47
48     function runTest()
49     {
50       // starting the test itself: get to a known place.
51       document.getElementById("start").focus();
52
53       initTest(resultMap, testCompleted);
54     }
55
56     function testCompleted()
57     {
58       if (window.layoutTestController)
59         layoutTestController.notifyDone();
60     }
61
62     window.onload = runTest;
63     </script>
64     <script src="js/resources/js-test-post.js"></script>
65   </head>
66   <body>
67   <table style="text-align: top;"  border="0" cellpadding="3px" cellspacing="3px">
68     <tr>
69       <td valign="top" width="10%">
70         <a id="start" href="#">Link</a><br>
71       </td>
72       <td valign="top">
73         <iframe width="50%" height="100px" frameborder="1" src="resources/iframe.html"></iframe><br>
74       </td>
75       <td valign="top" width="10%">
76         <a id="9" href="#">Link</a><br>
77       </td>
78     </tr>
79     <tr>
80       <td valign="top" width="10%">
81         <a id="10" href="#">Link</a><br>
82       </td>
83       <td valign="top">
84           <p><a id="11" href="#">Here</a> is a link.</p>
85       </td>
86       <td valign="top" width="10%">
87         <a id="12" href="#">Link</a><br>
88       </td>
89     </tr>
90   </table>
91   <div id="console"></div>
92   </body>
93 </html>