blob: c6f28c2f14376567b6ce81b4ff979e7f05cd7532 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="log"></div>
<select autofocus>
<option selected>a</option>
<option>b</option>
<option>c</option>
</select>
<script>
test(function() {
var select = document.querySelector('select');
assert_not_equals(null, select);
select.focus();
assert_equals(select, document.activeElement, 'has focus');
assert_equals(select.selectedIndex, 0, 'starts at 0');
eventSender.keyDown('ArrowRight', ['shiftKey']);
assert_equals(select.selectedIndex, 0, 'shift+right is ignored');
eventSender.keyDown('ArrowRight', ['ctrlKey']);
assert_equals(select.selectedIndex, 0, 'ctrl+right is ignored');
eventSender.keyDown('ArrowRight', ['altKey']);
assert_equals(select.selectedIndex, 0, 'alt+right is ignored');
eventSender.keyDown('ArrowRight', ['metaKey']);
assert_equals(select.selectedIndex, 0, 'meta+right is ignored');
}, 'Tests that arrow keys with modifiers are ignored');
</script>
</body>