OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script src="resources/spatial-navigation-utils.js"></script> | 4 <script src="resources/spatial-navigation-utils.js"></script> |
5 </head> | 5 </head> |
6 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> | 6 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <table style="text-align: left; width: 100%; margin-left: auto; margin-right
: auto;" border="1" cellpadding="2" cellspacing="1"> | 8 <table style="text-align: left; width: 100%; margin-left: auto; margin-right
: auto;" border="1" cellpadding="2" cellspacing="1"> |
9 <tbody> | 9 <tbody> |
10 <tr> | 10 <tr> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ["Left", "start"], | 45 ["Left", "start"], |
46 ["Left", "start"], | 46 ["Left", "start"], |
47 ["Left", "4"], | 47 ["Left", "4"], |
48 ["Right", "start"], | 48 ["Right", "start"], |
49 ["DONE", "DONE"] | 49 ["DONE", "DONE"] |
50 ]; | 50 ]; |
51 | 51 |
52 if (window.testRunner) { | 52 if (window.testRunner) { |
53 testRunner.dumpAsText(); | 53 testRunner.dumpAsText(); |
54 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | 54 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
55 testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1); | 55 window.internals.settings.setSpatialNavigationEnabled(true); |
56 testRunner.waitUntilDone(); | 56 testRunner.waitUntilDone(); |
57 } | 57 } |
58 | 58 |
59 function runTest() | 59 function runTest() |
60 { | 60 { |
61 // starting the test itself: get to a known place. | 61 // starting the test itself: get to a known place. |
62 document.getElementById("start").focus(); | 62 document.getElementById("start").focus(); |
63 | 63 |
64 initTest(resultMap, testCompleted); | 64 initTest(resultMap, testCompleted); |
65 } | 65 } |
66 | 66 |
67 function testCompleted() | 67 function testCompleted() |
68 { | 68 { |
69 if (!window.testRunner) | 69 if (!window.testRunner) |
70 return; | 70 return; |
71 | 71 |
72 var text = 'A text containing a space'; | 72 var text = 'A text containing a space'; |
73 for (var i = 0; i < text.length; ++i) | 73 for (var i = 0; i < text.length; ++i) |
74 eventSender.keyDown(text.charAt(i)); | 74 eventSender.keyDown(text.charAt(i)); |
75 shouldBeEqualToString("document.getElementById('start').value", text); | 75 shouldBeEqualToString("document.getElementById('start').value", text); |
76 | 76 |
77 testRunner.notifyDone(); | 77 testRunner.notifyDone(); |
78 } | 78 } |
79 | 79 |
80 window.onload = runTest; | 80 window.onload = runTest; |
81 | 81 |
82 </script> | 82 </script> |
83 </body> | 83 </body> |
84 </html> | 84 </html> |
OLD | NEW |