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 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.
| |
6 </head> | |
7 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> | |
8 <p id="description"></p> | |
9 <table style="text-align: left; width: 100%; margin-left: auto; margin-right : auto;" border="1" cellpadding="2" cellspacing="1"> | |
10 <tbody> | |
11 <tr> | |
12 <td style="vertical-align: top; text-align: center;"><a id="left" href ="a">Left</a></td> | |
13 <td style="vertical-align: top; text-align: center;"><input id="start" type="date" value="text"></td> | |
14 <td style="vertical-align: top; text-align: center;"><a id="right" hre f="a">Right</a></td> | |
15 </tr> | |
16 </tbody> | |
17 </table> | |
18 <div id="console"></div> | |
19 <script type="application/javascript"> | |
20 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.
| |
21 * Pre-conditions:<br>\ | |
22 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.
| |
23 * Navigation steps:<br>\ | |
24 1) Loads this page, focus goes to "start" automatically.<br>\ | |
25 2) Focus moves away from input box, left and right to neighbor n odes and back.<br>'); | |
26 | |
27 var resultMap = [ | |
28 | |
29 ["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.
| |
30 ["Right", "start"], // month | |
31 ["Right", "start"], // day | |
32 ["Right", "start"], // year | |
33 ["Right", "right"], | |
34 ["Left", "start"], | |
35 ["DONE", "DONE"] | |
36 ]; | |
37 | |
38 if (window.testRunner) { | |
39 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.
| |
40 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | |
41 window.internals.settings.setSpatialNavigationEnabled(true); | |
42 testRunner.waitUntilDone(); | |
43 } | |
44 | |
45 function runTest() | |
46 { | |
47 // starting the test itself: get to a known place. | |
48 document.getElementById("start").focus(); | |
49 | |
50 initTest(resultMap, testCompleted); | |
51 } | |
52 | |
53 function testCompleted() | |
54 { | |
55 if (window.testRunner) | |
56 testRunner.notifyDone(); | |
tkent
2013/08/13 23:09:56
We should use jsTestIsAsync=true + finishJSTest().
Krzysztof Olczyk
2013/08/23 12:03:17
Done.
| |
57 } | |
58 | |
59 window.onload = runTest; | |
60 | |
61 </script> | |
62 </body> | |
63 </html> | |
OLD | NEW |