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

Side by Side Diff: LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added tests Created 7 years, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 <script src="resources/spatial-navigation-utils.js"></script>
5 <script src="js/resources/js-test-post.js"></script>
6 </head>
7 <style>
8 #e2 {
9 nav-left: #e4;
10 }
11 #e4 {
12 nav-left: #e6;
13 }
14 #e5 {
15 nav-right: #e9;
16 nav-up: #e2;
17 }
18 #e6 {
19 nav-down: #e8;
20 }
21 #e8 {
22 nav-down: #e5;
23 }
24 #e9 {
25 nav-up: #e9;
26 nav-right: #e5;
27 }
28 </style>
29 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
30 <p id="description"></p>
31 <table style="text-align: left; width: 100%; margin-left: auto; margin-right : auto;" border="1" cellpadding="2" cellspacing="1">
32 <tbody>
33 <tr>
34 <td style="vertical-align: top; text-align: center;"><a id="e1" href=" a">1</a></td>
35 <td style="vertical-align: top; text-align: center;"><a id="e2" href=" a">2</a></td>
36 <td style="vertical-align: top; text-align: center;"><a id="e3" href=" a">3</a></td>
37 </tr>
38 <tr>
39 <td style="vertical-align: top; text-align: center;"><a id="e4" href=" a">4</a></td>
40 <td style="vertical-align: top; text-align: center;"><a id="e5" href=" 5">5</td>
41 <td style="vertical-align: top; text-align: center;"><a id="e6" href=" a">6</a></td>
42 </tr>
43 <tr>
44 <td style="vertical-align: top; text-align: center;"><a id="e7" href=" a">7</a></td>
45 <td style="vertical-align: top; text-align: center;"><a id="e8" href=" a">8</a></td>
46 <td style="vertical-align: top; text-align: center;"><a id="e9" href=" a">9</a></td>
47 </tr>
48 </tbody>
49 </table>
50 <div id="console"></div>
51 <script type="application/javascript">
52 description('This test ensures the correctness of Spatial Navigation (SNav) when CSS3 nav-up/down/left/right properties are set.<br>\
53 * Pre-conditions:<br>\
54 1) DRT support for SNav enable/disable.<br>\
55 * Navigation steps:<br>\
56 1) Loads this page, focus goes to start position (element #e5) a utomatically.<br>\
57 2) Focus moves away from start postion in various direction, CSS nav-* attributes are expected to be respected.<br>');
58
59 var resultMap = [
60 ["Right", "e9"],
61 ["Up", "e9"],
62 ["Right", "e5"],
63 ["Up", "e2"],
64 ["Left", "e4"],
65 ["Left", "e6"],
66 ["Down", "e8"],
67 ["Down", "e5"],
68 ["DONE", "DONE"]
69 ];
70
71 if (window.testRunner) {
72 testRunner.dumpAsText();
73 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
74 window.internals.settings.setSpatialNavigationEnabled(true);
75 testRunner.waitUntilDone();
76 }
77
78 function runTest()
79 {
80 // starting the test itself: get to a known place.
81 document.getElementById("e5").focus();
82
83 initTest(resultMap, testCompleted);
84 }
85
86 function testCompleted()
87 {
88 if (window.testRunner)
89 testRunner.notifyDone();
90 }
91
92 window.onload = runTest;
93
94 </script>
95 </body>
96 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698