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

Side by Side Diff: LayoutTests/fast/events/keydown-numlock-standard-location.html

Issue 22831043: KeyboardEvent.location should be DOM_KEY_LOCATION_STANDARD for Num Lock key (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove mention of DRT Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/keydown-numlock-standard-location-expected.txt » ('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 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Checks that KeyboardEvent.location is DOM_KEY_LOCATION_STANDARD for NumLock key.");
9
10 var lastKeyboardEvent = null;
11 function recordKeyEvent(ev) {
12 ev = ev || event;
13 ev.keyCode = (ev.which || ev.keyCode);
14 if (window.eventSender) {
15 lastKeyboardEvent = ev;
16 } else {
17 debug('Type=' + ev.type + ',' +
18 'keyCode=' + ev.keyCode + ',' +
19 'ctrlKey=' + ev.ctrlKey + ',' +
20 'shiftKey=' + ev.shiftKey + ',' +
21 'altKey=' + ev.altKey + ',' +
22 'metaKey=' + ev.metaKey + ',' +
23 'location=' + ev.location);
24 }
25 }
26
27 var textarea = document.createElement("textarea");
28 textarea.addEventListener("keydown", recordKeyEvent, false);
29 document.body.insertBefore(textarea, document.body.firstChild);
30 textarea.focus();
31
32 var VKEY_NUMLOCK = 0x90;
33
34 if (window.eventSender) {
35 eventSender.keyDown("numLock");
36 shouldBeEqualToString("lastKeyboardEvent.type", "keydown");
37 shouldBe("lastKeyboardEvent.keyCode", "VKEY_NUMLOCK");
38 shouldBe("lastKeyboardEvent.location", "KeyboardEvent.DOM_KEY_LOCATION_STAND ARD");
39 } else {
40 debug("This test needs window.eventSender to run.");
41 }
42
43 </script>
44 <script src="../js/resources/js-test-post.js"></script>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/keydown-numlock-standard-location-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698