Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / spatial-navigation / snav-date.html
blob8d15dc671caae981e1bdeba19ae85631ab9296a4
1 <!DOCTYPE html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/spatial-navigation-utils.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
8 if (window.testRunner) {
9 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
10 window.internals.settings.setSpatialNavigationEnabled(true);
12 </script>
13 </head>
14 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
15 <p id="description"></p>
16 <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
17 <tbody>
18 <tr>
19 <td style="vertical-align: top; text-align: center;"><a id="left" href="a">Left</a></td>
20 <td style="vertical-align: top; text-align: center;"><input id="start" type="date" value="text"></td>
21 <td style="vertical-align: top; text-align: center;"><a id="right" href="a">Right</a></td>
22 </tr>
23 </tbody>
24 </table>
25 <div id="console"></div>
26 <script type="application/javascript">
27 description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over date input element (having shadow DOM).<br>\
28 * Navigation steps:<br>\
29 1) Loads this page, focus goes to "start" automatically.<br>\
30 2) Focus moves away from input box, left and right to neighbor nodes and back.<br>');
32 var resultMap = [
33 ["Left", "left"],
34 ["Right", "start"], // month
35 ["Right", "start"], // day
36 ["Right", "start"], // year
37 ["Right", "right"],
38 ["Left", "start"],
39 ["DONE", "DONE"]
42 function runTest()
44 // starting the test itself: get to a known place.
45 document.getElementById("start").focus();
47 initTest(resultMap, finishJSTest);
50 window.onload = runTest;
51 </script>
52 </body>
53 </html>