3 <script src=
"../../resources/js-test.js"></script>
4 <script src=
"resources/spatial-navigation-utils.js"></script>
5 <script type=
"application/javascript">
29 if (window.testRunner) {
30 testRunner.dumpAsText();
31 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
32 window.internals.settings.setSpatialNavigationEnabled(true);
33 testRunner.waitUntilDone();
38 // starting the test itself: get to a known place.
39 document.getElementById(
"start").focus();
41 initTest(resultMap, testCompleted);
44 function testCompleted()
46 if (window.testRunner)
47 testRunner.notifyDone();
50 window.onload = runTest;
53 div.simple { border:
3px solid red;}
54 div.simple:focus { border:
3px solid gray;}
55 div.positioned { border:
3px solid blue;}
56 div.positioned:focus{ border:
3px solid gray;}
57 #popup {position: absolute; top:
120; left:
240; border:
8px solid black; z-index:
1000}
60 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml" style=
"padding:20px">
63 <div tabindex=
"1" id=
"p11" class=
"positioned"><img src=
"resources/green.png" width=
160px height=
60px
></div>
64 <div tabindex=
"2" id=
"p12" class=
"positioned"><img src=
"resources/green.png" width=
160px height=
60px
></div>
66 <div tabindex=
"1" id=
"p21" class=
"positioned"><img src=
"resources/green.png" width=
160px height=
60px
></div>
67 <div tabindex=
"2" id=
"p22" class=
"positioned"><img src=
"resources/green.png" width=
160px height=
60px
></div>
73 <div tabindex=
"1" id=
"s11" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
74 <div tabindex=
"2" id=
"s12" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
75 <div tabindex=
"3" id=
"s13" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
76 <div tabindex=
"4" id=
"s14" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
77 <div tabindex=
"5" id=
"s15" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
79 <div tabindex=
"1" id=
"start" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
80 <div tabindex=
"2" id=
"s22" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
81 <div tabindex=
"3" id=
"s23" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
82 <div tabindex=
"4" id=
"s24" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
83 <div tabindex=
"5" id=
"s25" class=
"simple"><img src=
"resources/green.png" width=
160px height=
60px
></div>
85 <div id=
"console"></div>
86 This test is testing that we can prefer the elements with higher Z indexes.