Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script> | |
| 5 | |
| 6 function pass() | |
|
dmazzoni
2013/09/10 21:35:47
One last thing - since this is a new test it'd be
| |
| 7 { | |
| 8 var el = document.querySelector('pre'); | |
| 9 el.textContent += 'PASS\n'; | |
| 10 } | |
| 11 | |
| 12 function fail() | |
| 13 { | |
| 14 var el = document.querySelector('pre'); | |
| 15 el.textContent += 'FAIL\n'; | |
| 16 } | |
| 17 | |
| 18 if (window.testRunner) { | |
| 19 testRunner.dumpAsText(); | |
| 20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true); | |
| 21 } | |
| 22 | |
| 23 window.onload = function() | |
| 24 { | |
| 25 if (!window.testRunner) | |
| 26 return; | |
| 27 | |
| 28 for (var i = 0; i < 3; i++) { | |
| 29 eventSender.keyDown('\t'); | |
| 30 } | |
| 31 }; | |
| 32 | |
| 33 </script> | |
| 34 </head> | |
| 35 <body> | |
| 36 | |
| 37 <p>This test ensures that we can tab to all anchor elements. Press tab three | |
| 38 times to focus the elements below. | |
| 39 | |
| 40 <p><a onfocus="pass()" href="#">Focusable</a></p> | |
| 41 <p><a onfocus="fail()">Not focusable</a></p> | |
| 42 <p><a tabindex=0 onfocus="pass()" href="#">Focusable</a></p> | |
| 43 <p><a tabindex=0 onfocus="pass()">Focusable</a></p> | |
| 44 <p><input onfocus="fail()"></p> | |
| 45 | |
| 46 <p>Result | |
| 47 | |
| 48 <pre id="out"></pre> | |
| 49 | |
| 50 </body> | |
| 51 </html> | |
| OLD | NEW |