Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: LayoutTests/fast/spatial-navigation/snav-aligned-not-aligned.html

Issue 797463003: spatnav: Allow focus move to a close-by not-fully-aligned node over a distant but fully-aligned nod… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/spatial-navigation/snav-aligned-not-aligned-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/spatial-navigation-utils.js"></script> 4 <script src="resources/spatial-navigation-utils.js"></script>
5 </head> 5 </head>
6 <style> 6 <style>
7 body a { 7 body a {
8 position: absolute; 8 position: absolute;
9 height: 100px; 9 height: 50px;
10 width: 100px; 10 width: 100px;
11 border: 1px solid black; 11 border: 1px solid black;
12 } 12 }
13 #e1 { 13 #e1 {
14 left: 10px; 14 left: 50px;
15 top: 210px; 15 top: 250px;
16 } 16 }
17 #e2 { 17 #e2 {
18 left: 120px; 18 left: 200px;
19 top: 250px; 19 top: 300px;
20 height: 100px;
20 } 21 }
21 #e3 { 22 #e3 {
22 left: 250px; 23 left: 350px;
24 top: 300px;
25 }
26 #e4 {
27 left: 500px;
28 top: 200px;
29 height: 100px;
30 }
31 #e5 {
32 left: 650px;
23 top: 250px; 33 top: 250px;
24 height: 120px;
25 } 34 }
26 </style> 35 </style>
27 <body id="some-content" onload="runTest()"> 36 <body id="some-content" onload="runTest()">
28 <p id="description"></p> 37 <p id="description"></p>
29 <div id="elements"> 38 <div id="elements">
30 <a id="e1" href="#e1">Element 1</a> 39 <a id="e1" href="#e1">E1</a>
31 <a id="e2" href="#e2">Element 2</a> 40 <a id="e2" href="#e2">E2</a>
32 <a id="e3" href="#e3">Element 3</a> 41 <a id="e3" href="#e3">E3</a>
42 <a id="e4" href="#e4">E4</a>
43 <a id="e5" href="#e5">E5</a>
33 </div> 44 </div>
34 <div id="console"></div> 45 <div id="console"></div>
35 <script type="application/javascript"> 46 <script type="application/javascript">
36 description('This test ensures that e2 is NOT below e1 and e3 is NOT below e2.') ; 47 description('This test ensures that Spatial Navigation works with symmetrically positoned rects');
37 48
38 jsTestIsAsync = true; 49 jsTestIsAsync = true;
39 50
40 var resultMap = [ 51 var resultMap = [
41 ["Down", "e1"], 52 ["Right", "e4"],
42 ["Right", "e2"], 53 ["Right", "e5"],
54 ["Left", "e4"],
55 ["Left", "e1"],
43 ["Down", "e2"], 56 ["Down", "e2"],
44 ["Right", "e3"], 57 ["Right", "e3"],
45 ["Up", "e3"], 58 ["Right", "e4"],
46 ["Left", "e2"],
47 ["Up", "e2"],
48 ["Left", "e1"],
49 ["DONE", "DONE"] 59 ["DONE", "DONE"]
50 ]; 60 ];
51 61
52 if (window.testRunner) { 62 if (window.testRunner) {
53 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); 63 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
54 window.internals.settings.setSpatialNavigationEnabled(true); 64 window.internals.settings.setSpatialNavigationEnabled(true);
55 } 65 }
56 66
57 function runTest() 67 function runTest()
58 { 68 {
59 // starting the test itself: get to a known place. 69 // starting the test itself: get to a known place.
60 document.getElementById("e1").focus(); 70 document.getElementById("e1").focus();
61 71
62 initTest(resultMap, finishJSTest); 72 initTest(resultMap, finishJSTest);
63 } 73 }
64 </script> 74 </script>
65 </body> 75 </body>
66 </html> 76 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/spatial-navigation/snav-aligned-not-aligned-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698