Index: LayoutTests/fast/spatial-navigation/snav-date.html |
diff --git a/LayoutTests/fast/spatial-navigation/snav-date.html b/LayoutTests/fast/spatial-navigation/snav-date.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ac2e53faa8090955f64edecf609be0c7b5e44b39 |
--- /dev/null |
+++ b/LayoutTests/fast/spatial-navigation/snav-date.html |
@@ -0,0 +1,63 @@ |
+<!DOCTYPE html> |
+ <head> |
+ <script src="../js/resources/js-test-pre.js"></script> |
+ <script src="resources/spatial-navigation-utils.js"></script> |
+ <script src="js/resources/js-test-post.js"></script> |
tkent
2013/08/13 23:09:56
looks a wrong path.
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ </head> |
+ <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> |
+ <p id="description"></p> |
+ <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1"> |
+ <tbody> |
+ <tr> |
+ <td style="vertical-align: top; text-align: center;"><a id="left" href="a">Left</a></td> |
+ <td style="vertical-align: top; text-align: center;"><input id="start" type="date" value="text"></td> |
+ <td style="vertical-align: top; text-align: center;"><a id="right" href="a">Right</a></td> |
+ </tr> |
+ </tbody> |
+ </table> |
+ <div id="console"></div> |
+ <script type="application/javascript"> |
+ description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over date input element (having shadow DOM).<br>\ |
tkent
2013/08/13 23:09:56
All of lines in the <script> content has leading 4
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ * Pre-conditions:<br>\ |
+ 1) DRT support for SNav enable/disable.<br>\ |
tkent
2013/08/13 23:09:56
We don't have DRT any longer.
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ * Navigation steps:<br>\ |
+ 1) Loads this page, focus goes to "start" automatically.<br>\ |
+ 2) Focus moves away from input box, left and right to neighbor nodes and back.<br>'); |
+ |
+ var resultMap = [ |
+ |
+ ["Left", "left"], |
tkent
2013/08/13 23:09:56
We usually use 4-space indentation in JavaScript c
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ ["Right", "start"], // month |
+ ["Right", "start"], // day |
+ ["Right", "start"], // year |
+ ["Right", "right"], |
+ ["Left", "start"], |
+ ["DONE", "DONE"] |
+ ]; |
+ |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
tkent
2013/08/13 23:09:56
You don't need to call this because js-test-pre.js
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
+ window.internals.settings.setSpatialNavigationEnabled(true); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ function runTest() |
+ { |
+ // starting the test itself: get to a known place. |
+ document.getElementById("start").focus(); |
+ |
+ initTest(resultMap, testCompleted); |
+ } |
+ |
+ function testCompleted() |
+ { |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
tkent
2013/08/13 23:09:56
We should use jsTestIsAsync=true + finishJSTest().
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
|
+ } |
+ |
+ window.onload = runTest; |
+ |
+ </script> |
+ </body> |
+</html> |