Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-z-index.html
1 <html>
2   <head>
3     <script src="../../resources/js-test.js"></script>
4     <script src="resources/spatial-navigation-utils.js"></script>
5     <script type="application/javascript">
6
7     var resultMap = [
8       ["Down", "s22"],
9       ["Down", "p11"],
10       ["Down", "s23"],
11       ["Down", "p12"],
12       ["Down", "s24"],
13       ["Down", "s25"],
14       ["Up", "s24"],
15       ["Up", "p12"],
16       ["Right", "p22"],
17       ["Left", "p12"],
18       ["Left", "s24"],
19       ["Left", "s14"],
20       ["Up", "s13"],
21       ["Up", "s12"],
22       ["Right", "s22"],
23       ["Right", "p11"],
24       ["Right", "p21"],
25       ["Up", "s22"],
26       ["Up", "start"],
27       ["DONE", "DONE"]
28     ];
29
30     if (window.testRunner) {
31       testRunner.dumpAsText();
32       testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
33       window.internals.settings.setSpatialNavigationEnabled(true);
34       testRunner.waitUntilDone();
35     }
36
37     function runTest()
38     {
39       // starting the test itself: get to a known place.
40       document.getElementById("start").focus();
41
42       initTest(resultMap, testCompleted);
43     }
44
45     function testCompleted()
46     {
47       if (window.testRunner)
48         testRunner.notifyDone();
49     }
50
51     window.onload = runTest;
52     </script>
53     <style>
54     div.simple { border: 3px solid red;}
55     div.simple:focus { border: 3px solid gray;}
56     div.positioned { border: 3px solid blue;}
57     div.positioned:focus{ border: 3px solid gray;}
58     #popup {position: absolute; top:120; left:240; border: 8px solid black; z-index:1000}
59     </style>
60   </head>
61 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml" style="padding:20px">
62 <div id="popup">
63 <table><tr><td>
64 <div tabindex="1" id="p11" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
65 <div tabindex="2" id="p12" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
66 </td><td>
67 <div tabindex="1" id="p21" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
68 <div tabindex="2" id="p22" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
69 </td></tr></table>
70 </div>
71
72 <table>
73 <tr><td>
74 <div tabindex="1" id="s11" class="simple"><img src="resources/green.png" width=160px height=60px></div>
75 <div tabindex="2" id="s12" class="simple"><img src="resources/green.png" width=160px height=60px></div>
76 <div tabindex="3" id="s13" class="simple"><img src="resources/green.png" width=160px height=60px></div>
77 <div tabindex="4" id="s14" class="simple"><img src="resources/green.png" width=160px height=60px></div>
78 <div tabindex="5" id="s15" class="simple"><img src="resources/green.png" width=160px height=60px></div>
79 </td><td>
80 <div tabindex="1" id="start" class="simple"><img src="resources/green.png" width=160px height=60px></div>
81 <div tabindex="2" id="s22" class="simple"><img src="resources/green.png" width=160px height=60px></div>
82 <div tabindex="3" id="s23" class="simple"><img src="resources/green.png" width=160px height=60px></div>
83 <div tabindex="4" id="s24" class="simple"><img src="resources/green.png" width=160px height=60px></div>
84 <div tabindex="5" id="s25" class="simple"><img src="resources/green.png" width=160px height=60px></div>
85 </td></tr></table>
86 <div id="console"></div>
87 This test is testing that we can prefer the elements with higher Z indexes.
88 </body>
89 </html>