Git init
[framework/web/webkit-efl.git] / LayoutTests / fast / spatial-navigation / snav-radio.html
1 <html>
2   <!--
3     This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
4
5     * Pre-conditions:
6     1) DRT support for SNav enable/disable.
7
8     * Navigation steps:
9     1) Loads this page, focus goes to "start" automatically.
10     2) Focus moves away from select in 4 different directions to neighbor nodes and back.
11   -->
12   <head>
13     <script src="../js/resources/js-test-pre.js"></script>
14     <script src="resources/spatial-navigation-utils.js"></script>
15     <script type="application/javascript">
16
17     var resultMap = [
18       ["Down", "8"],
19       ["Up", "start"],
20       ["Up", "2"],
21       ["Down", "start"],
22       ["Right", "6"],
23       ["Left", "start"],
24       ["Left", "4"],
25       ["Right", "start"],
26       ["DONE", "DONE"]
27     ];
28
29     if (window.layoutTestController) {
30       layoutTestController.dumpAsText();
31       layoutTestController.setSpatialNavigationEnabled(true);
32       layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
33       layoutTestController.waitUntilDone();
34     }
35
36     function runTest()
37     {
38       // starting the test itself: get to a known place.
39       document.getElementById("start").focus();
40
41       initTest(resultMap, testCompleted);
42     }
43
44     function testCompleted()
45     {
46       if (window.layoutTestController)
47         layoutTestController.notifyDone();
48     }
49
50     window.onload = runTest;
51
52     </script>
53     <script src="js/resources/js-test-post.js"></script>
54   </head>
55   <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
56     <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
57       <tbody>
58         <tr>
59           <td style="vertical-align: top; text-align: center;"></td>
60           <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
61           <td style="vertical-align: top; text-align: center;"></td>
62         </tr>
63         <tr>
64           <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
65           <td style="vertical-align: top; text-align: center;"><input type="radio" id="start" ></td>
66           <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
67         </tr>
68         <tr>
69           <td style="vertical-align: top; text-align: center;"></td>
70           <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
71           <td style="vertical-align: top; text-align: center;"></td>
72         </tr>
73       </tbody>
74     </table>
75     <div id="console"></div>
76   </body>
77 </html>
78