OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test ensures the correctness of the "Fully aligned" precedence | 3 This test ensures the correctness of the "Fully aligned" precedence |
4 logic implemented by Spatial Navigation algorithm in an vertical direction: | 4 logic implemented by Spatial Navigation algorithm in an vertical direction: |
5 targets whose middle falls between the top and bottom of the current focused | 5 targets whose middle falls between the top and bottom of the current focused |
6 element are preferably to move focus to, even if it is not the shortest dist
ance. | 6 element are preferably to move focus to, even if it is not the shortest dist
ance. |
7 | 7 |
8 * Pre-conditions: | 8 * Pre-conditions: |
9 1) DRT support for SNav enable/disable. | 9 1) DRT support for SNav enable/disable. |
10 | 10 |
11 * Navigation steps: | 11 * Navigation steps: |
12 1) Loads this page, focus goes to "start" automatically. | 12 1) Loads this page, focus goes to "start" automatically. |
13 2) Focus moves preferably to elements right up or above the | 13 2) Focus moves preferably to elements right up or above the |
14 current focused element, even when there are some other closer | 14 current focused element, even when there are some other closer |
15 but not vertically aligned elements in the same direction. | 15 but not vertically aligned elements in the same direction. |
16 --> | 16 --> |
17 <head> | 17 <head> |
18 <script src="../../resources/js-test.js"></script> | 18 <script src="../../resources/js-test.js"></script> |
19 <script src="resources/spatial-navigation-utils.js"></script> | 19 <script src="resources/spatial-navigation-utils.js"></script> |
20 <script type="application/javascript"> | 20 <script type="application/javascript"> |
21 | 21 |
22 var resultMap = [ | 22 var resultMap = [ |
23 ["Down", "4"], | 23 ["Down", "4"], |
24 ["Down", "6"], | 24 ["Down", "6"], |
25 ["Down", "8"], | 25 ["Down", "7"], |
26 ["Down", "end"], | 26 ["Down", "end"], |
27 ["Up", "7"], | 27 ["Up", "8"], |
28 ["Up", "2"], | 28 ["Up", "6"], |
29 ["DONE", "DONE"] | 29 ["DONE", "DONE"] |
30 ]; | 30 ]; |
31 | 31 |
32 if (window.testRunner) { | 32 if (window.testRunner) { |
33 testRunner.dumpAsText(); | 33 testRunner.dumpAsText(); |
34 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | 34 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
35 window.internals.settings.setSpatialNavigationEnabled(true); | 35 window.internals.settings.setSpatialNavigationEnabled(true); |
36 testRunner.waitUntilDone(); | 36 testRunner.waitUntilDone(); |
37 } | 37 } |
38 | 38 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 <br><br><br><br> | 72 <br><br><br><br> |
73 <div style="margin-left: 40px;"> | 73 <div style="margin-left: 40px;"> |
74 <a id="8" href="a">test<br></a> | 74 <a id="8" href="a">test<br></a> |
75 </div> | 75 </div> |
76 <a id="end" href="a">test<br></a> | 76 <a id="end" href="a">test<br></a> |
77 </div> | 77 </div> |
78 <div id="console"></div> | 78 <div id="console"></div> |
79 </body> | 79 </body> |
80 </html> | 80 </html> |
81 | 81 |
OLD | NEW |