| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <script src="../../../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> |
| 5 <div id="log"></div> |
| 6 |
| 7 <select autofocus> |
| 8 <option selected>a</option> |
| 9 <option>b</option> |
| 10 <option>c</option> |
| 11 </select> |
| 12 |
| 13 <script> |
| 14 |
| 15 test(function() { |
| 16 var select = document.querySelector('select'); |
| 17 assert_not_equals(null, select); |
| 18 |
| 19 select.focus(); |
| 20 assert_equals(select, document.activeElement, 'has focus'); |
| 21 |
| 22 assert_equals(select.selectedIndex, 0, 'starts at 0'); |
| 23 |
| 24 eventSender.keyDown('ArrowRight', ['shiftKey']); |
| 25 assert_equals(select.selectedIndex, 0, 'shift+right is ignored'); |
| 26 |
| 27 eventSender.keyDown('ArrowRight', ['ctrlKey']); |
| 28 assert_equals(select.selectedIndex, 0, 'ctrl+right is ignored'); |
| 29 |
| 30 eventSender.keyDown('ArrowRight', ['altKey']); |
| 31 assert_equals(select.selectedIndex, 0, 'alt+right is ignored'); |
| 32 |
| 33 eventSender.keyDown('ArrowRight', ['metaKey']); |
| 34 assert_equals(select.selectedIndex, 0, 'meta+right is ignored'); |
| 35 }, 'Tests that arrow keys with modifiers are ignored'); |
| 36 |
| 37 </script> |
| 38 </body> |
| OLD | NEW |