| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function pass() | 6 function pass() |
| 7 { | 7 { |
| 8 var el = document.querySelector('pre'); | 8 var el = document.querySelector('pre'); |
| 9 el.textContent = 'PASS'; | 9 el.textContent += 'PASS\n'; |
| 10 } | 10 } |
| 11 | 11 |
| 12 function fail() | 12 function fail() |
| 13 { | 13 { |
| 14 var el = document.querySelector('pre'); | 14 var el = document.querySelector('pre'); |
| 15 el.textContent = 'FAIL'; | 15 el.textContent += 'FAIL\n'; |
| 16 } | 16 } |
| 17 | 17 |
| 18 if (window.testRunner) { | 18 if (window.testRunner) { |
| 19 testRunner.dumpAsText(); | 19 testRunner.dumpAsText(); |
| 20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', false); | 20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', false); |
| 21 } | 21 } |
| 22 | 22 |
| 23 window.onload = function() | 23 window.onload = function() |
| 24 { | 24 { |
| 25 if (!window.testRunner) | 25 if (!window.testRunner) |
| 26 return; | 26 return; |
| 27 | 27 |
| 28 for (var i = 0; i < 1; i++) { | 28 for (var i = 0; i < 2; i++) { |
| 29 eventSender.keyDown('\t'); | 29 eventSender.keyDown('\t'); |
| 30 } | 30 } |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 </script> | 33 </script> |
| 34 </head> | 34 </head> |
| 35 <body> | 35 <body> |
| 36 | 36 |
| 37 <p>This test ensures that we can tab to an a element with a tab index. Press tab | 37 <p>This test ensures that we can tab to an a element with a tab index. Press tab |
| 38 to focus the element below. | 38 to focus the element below. |
| 39 | 39 |
| 40 <p><a tabindex=0 onfocus="fail()" href="#">Not focusable (given the WebKitTabToL
inks pref is set to false)</a> | 40 <p><a onfocus="fail()" href="#">Not focusable (given the WebKitTabToLinks pref i
s set to false)</a> |
| 41 <p><a onfocus="fail()">Not focusable</a> |
| 42 <p><a tabindex=0 onfocus="pass()" href="#">Focusable</a> |
| 41 <p><a tabindex=0 onfocus="pass()">Focusable</a> | 43 <p><a tabindex=0 onfocus="pass()">Focusable</a> |
| 42 | 44 |
| 43 <p>Result | 45 <p>Result |
| 44 | 46 |
| 45 <pre>FAIL</pre> | 47 <pre id="out"></pre> |
| 46 | 48 |
| 47 </body> | 49 </body> |
| 48 </html> | 50 </html> |
| OLD | NEW |