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

Side by Side Diff: chrome/test/data/textinput/keyevent_logging.html

Issue 23890039: Do not rewrite AltGr Key as Alt+Ctrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove HTML file 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('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 <html>
2 <head>
3 <script src="textinput_helper.js"></script>
4 <script>
5 var expectations = new Array();
6 var result = true;
7
8 /**
9 * Expectations are of the form:
10 * [ { keyCode: 39, shiftKey: true, ctrlKey: false, altKey: true}, ... ]
11 */
12 function initKeyDownExpectations(expect) {
13 expectations = expect;
14 result = true;
15 }
16
17 function didTestSucceed() {
18 if (!result) {
19 window.domAutomationController.send(false);
20 } else if (expectations.length != 0) {
21 console.error('There are un-satisfied expectations.');
22 window.domAutomationController.send(false);
23 } else {
24 window.domAutomationController.send(true);
25 }
26 }
27
28 window.onload = function() {
29 document.getElementById('text_id').onkeydown = function(e) {
30 if (expectations.length == 0) {
31 console.error('Expectations have been exhausted.');
32 return;
33 }
34
35 if (e.keyCode != expectations[0].keyCode) {
36 result = false;
37 console.error('keyCode does not match.' +
38 ' Expected:' + expectations[0].keyCode +
39 ' Actual: ' + e.keyCode);
40 }
41 if (e.shiftKey != expectations[0].shiftKey) {
42 result = false;
43 console.error('shiftKey does not match.' +
44 ' Expected:' + expectations[0].shiftKey +
45 ' Actual: ' + e.shiftKey);
46 }
47
48 if (e.ctrlKey != expectations[0].ctrlKey) {
49 result = false;
50 console.error('ctrlKey does not match.' +
51 ' Expected:' + expectations[0].ctrlKey +
52 ' Actual: ' + e.ctrlKey);
53 }
54
55 if (e.altKey != expectations[0].altKey) {
56 result = false;
57 console.error('altKey does not match.' +
58 ' Expected:' + expectations[0].altKey +
59 ' Actual: ' + e.altKey);
60 }
61
62 expectations.shift();
63 };
64 }
65 </script>
66 </head>
67 <body>
68 <input type="text" id="text_id">
69 </body>
70 </html>
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698