3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/spatial-navigation-utils.js"></script>
5 <script type="application/javascript">
30 if (window.testRunner) {
31 testRunner.dumpAsText();
32 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
33 window.internals.settings.setSpatialNavigationEnabled(true);
34 testRunner.waitUntilDone();
39 // starting the test itself: get to a known place.
40 document.getElementById("start").focus();
42 initTest(resultMap, testCompleted);
45 function testCompleted()
47 if (window.testRunner)
48 testRunner.notifyDone();
51 window.onload = runTest;
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}
61 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml" style="padding:20px">
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>
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>
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>
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>
86 <div id="console"></div>
87 This test is testing that we can prefer the elements with higher Z indexes.