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

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

Issue 20034002: Add support for KeyboardEvent.location attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/arrow-keys-on-body-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
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 23 matching lines...) Expand all
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.keyIdentifier
44 + ' - ' + (event.keyLocation === undefined ? "undefined" : locationN ame(event.keyLocation)) 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 + ' - ' + "keyIdentifier"
54 + ' - ' + "keyLocation" 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("leftArrow", []); 60 eventSender.keyDown("leftArrow", []);
61 } 61 }
62 62
63 </script> 63 </script>
64 64
65 </body> 65 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/arrow-keys-on-body-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698