Chromium Code Reviews| 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; | |
|
tkent
2013/08/25 22:11:36
Do not indent all of <script> content equally. Al
Krzysztof Olczyk
2013/08/28 08:13:01
Done.
| |
| 7 | |
| 8 if (window.testRunner) { | |
| 9 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | |
|
tkent
2013/08/25 22:11:36
We usually use 4-space indentation in JavaScript c
Krzysztof Olczyk
2013/08/28 08:13:01
Done.
| |
| 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 : auto;" 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="date" value="text"></td> | |
| 22 <td style="vertical-align: top; text-align: center;"><a id="right" hre f="a">Right</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 (SN av) algorithm over date input element (having shadow DOM).<br>\ | |
|
tkent
2013/08/25 22:11:36
Ditto for indentation.
Krzysztof Olczyk
2013/08/28 08:13:01
Done.
| |
| 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 neigh bor nodes 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, testCompleted); | |
|
tkent
2013/08/25 22:11:36
testCompleted function is redundant. You can do
Krzysztof Olczyk
2013/08/28 08:13:01
Done.
| |
| 49 } | |
| 50 | |
| 51 function testCompleted() | |
| 52 { | |
| 53 finishJSTest(); | |
| 54 } | |
| 55 | |
| 56 window.onload = runTest; | |
| 57 </script> | |
| 58 </body> | |
| 59 </html> | |
| OLD | NEW |