3 <script src=
"../../resources/js-test.js"></script>
4 <script src=
"resources/spatial-navigation-utils.js"></script>
6 window
.jsTestIsAsync
= true;
8 if (window
.testRunner
) {
9 testRunner
.overridePreference("WebKitTabToLinksPreferenceKey", 1);
10 window
.internals
.settings
.setSpatialNavigationEnabled(true);
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">
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>
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>');
34 [
"Right",
"start"], // month
35 [
"Right",
"start"], // day
36 [
"Right",
"start"], // year
44 // starting the test itself: get to a known place.
45 document.getElementById(
"start").focus();
47 initTest(resultMap, finishJSTest);
50 window.onload = runTest;