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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/arrow-keys-on-body.html

Issue 2120153003: Remove keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_key_identifier_3a
Patch Set: Rebase Created 4 years, 5 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
OLDNEW
1 <body 1 <body
2 onkeypress="log(eventInfo(event))" 2 onkeypress="log(eventInfo(event))"
3 onkeydown="log(eventInfo(event))" 3 onkeydown="log(eventInfo(event))"
4 onkeyup="log(eventInfo(event))"> 4 onkeyup="log(eventInfo(event))">
5 <p>Test that arrow keys do not dispatch keypress events even if there is no defa ult handler.</p> 5 <p>Test that arrow keys do not dispatch keypress events even if there is no defa ult handler.</p>
6 <p>To test manually, press arrow keys and verify that no keypress events are log ged.</p> 6 <p>To test manually, press arrow keys and verify that no keypress events are log ged.</p>
7 <div id="log"></div> 7 <div id="log"></div>
8 8
9 <script> 9 <script>
10 function log(msg) { 10 function log(msg) {
(...skipping 22 matching lines...) Expand all
33 event = window.event; 33 event = window.event;
34 target = event.srcElement ? event.srcElement : event.target; 34 target = event.srcElement ? event.srcElement : event.target;
35 if (event.type == "textInput") 35 if (event.type == "textInput")
36 return (where ? "(" + where + ") " : "") + target.tagName + " - " + even t.type + " - " + event.data 36 return (where ? "(" + where + ") " : "") + target.tagName + " - " + even t.type + " - " + event.data
37 + '. Value: "' + target.value + '".'; 37 + '. Value: "' + target.value + '".';
38 else if (event.type == "keydown" || event.type == "keypress" || event.type = = "keyup") 38 else if (event.type == "keydown" || event.type == "keypress" || event.type = = "keyup")
39 return (where ? "(" + where + ") " : "") + target.tagName 39 return (where ? "(" + where + ") " : "") + target.tagName
40 + (target.tagName == "INPUT" ? " " + target.type : "") 40 + (target.tagName == "INPUT" ? " " + target.type : "")
41 + " - " + event.type 41 + " - " + event.type
42 + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKe y] 42 + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKe y]
43 + ' - ' + event.keyIdentifier 43 + ' - ' + event.key
44 + ' - ' + (event.location === undefined ? "undefined" : locationName (event.location)) 44 + ' - ' + (event.location === undefined ? "undefined" : locationName (event.location))
45 + ' - ' + event.keyCode 45 + ' - ' + event.keyCode
46 + ' - ' + event.charCode; 46 + ' - ' + event.charCode;
47 47
48 } catch (ex) { 48 } catch (ex) {
49 alert(ex); 49 alert(ex);
50 } 50 }
51 } 51 }
52 log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"] 52 log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"]
53 + ' - ' + "keyIdentifier" 53 + ' - ' + "key"
54 + ' - ' + "location" 54 + ' - ' + "location"
55 + ' - ' + "keyCode" 55 + ' - ' + "keyCode"
56 + ' - ' + "charCode"); 56 + ' - ' + "charCode");
57 57
58 if (window.testRunner) { 58 if (window.testRunner) {
59 testRunner.dumpAsText(); 59 testRunner.dumpAsText();
60 eventSender.keyDown("ArrowLeft", []); 60 eventSender.keyDown("ArrowLeft", []);
61 } 61 }
62 62
63 </script> 63 </script>
64 64
65 </body> 65 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698