OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEven
t"> |
| 5 <script src="../js/resources/js-test-pre.js"></script> |
| 6 <script> |
| 7 function runTest() |
| 8 { |
| 9 if (!window.testRunner || !window.eventSender) { |
| 10 debug("FAIL: This test requires window.testRunner and window.eventSender
."); |
| 11 finishJSTest(); |
| 12 return; |
| 13 } |
| 14 |
| 15 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true); |
| 16 |
| 17 for (var i = 0; i < 3; i++) |
| 18 eventSender.keyDown('\t'); |
| 19 |
| 20 finishJSTest(); |
| 21 }; |
| 22 |
| 23 window.addEventListener('load', runTest); |
| 24 </script> |
| 25 </head> |
| 26 <body> |
| 27 |
| 28 <p>This test ensures that we can tab to all anchor elements. Press tab three |
| 29 times to focus the elements below. |
| 30 |
| 31 <p><a onfocus="testPassed('gave focus to focusable element')" href="#">Focusable
</a></p> |
| 32 <p><a onfocus="testFailed('gave focus to unfocusable element')">Not focusable</a
></p> |
| 33 <p><a tabindex=0 onfocus="testPassed('gave focus to focusable element')" href="#
">Focusable</a></p> |
| 34 <p><a tabindex=0 onfocus="testPassed('gave focus to focusable element')">Focusab
le</a></p> |
| 35 <p><input onfocus="testFailed('should have stopped testing before this element')
"></p> |
| 36 |
| 37 <p>Result |
| 38 |
| 39 <div id="console"></div> |
| 40 |
| 41 </body> |
| 42 </html> |
OLD | NEW |