OLD | NEW |
(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> |
| 6 window.jsTestIsAsync = true; |
| 7 |
| 8 if (window.testRunner) { |
| 9 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
| 10 window.internals.settings.setSpatialNavigationEnabled(true); |
| 11 } |
| 12 </script> |
| 13 <script src="../js/resources/js-test-post.js"></script> |
| 14 </head> |
| 15 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> |
| 16 <p id="description"></p> |
| 17 <table style="text-align: left; width: 100%; margin-left: auto; margin-right: au
to;" border="1" cellpadding="2" cellspacing="1"> |
| 18 <tbody> |
| 19 <tr> |
| 20 <td style="vertical-align: top; text-align: center;"><a id="left" href="a">Left<
/a></td> |
| 21 <td style="vertical-align: top; text-align: center;"><input id="start" type="dat
e" value="text"></td> |
| 22 <td style="vertical-align: top; text-align: center;"><a id="right" href="a">Righ
t</a></td> |
| 23 </tr> |
| 24 </tbody> |
| 25 </table> |
| 26 <div id="console"></div> |
| 27 <script type="application/javascript"> |
| 28 description('This test ensures the correctness of Spatial Navigation (SNav) algo
rithm over date input element (having shadow DOM).<br>\ |
| 29 * Navigation steps:<br>\ |
| 30 1) Loads this page, focus goes to "start" automatically.<br>\ |
| 31 2) Focus moves away from input box, left and right to neighbor node
s and back.<br>'); |
| 32 |
| 33 var resultMap = [ |
| 34 ["Left", "left"], |
| 35 ["Right", "start"], // month |
| 36 ["Right", "start"], // day |
| 37 ["Right", "start"], // year |
| 38 ["Right", "right"], |
| 39 ["Left", "start"], |
| 40 ["DONE", "DONE"] |
| 41 ]; |
| 42 |
| 43 function runTest() |
| 44 { |
| 45 // starting the test itself: get to a known place. |
| 46 document.getElementById("start").focus(); |
| 47 |
| 48 initTest(resultMap, finishJSTest); |
| 49 } |
| 50 |
| 51 window.onload = runTest; |
| 52 </script> |
| 53 </body> |
| 54 </html> |
| 55 |
OLD | NEW |