Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/ignore-keydown-with-modifiers.html

Issue 2511923002: <select>: ignore modified keydown events in some cases (Closed)
Patch Set: tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698