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

Side by Side Diff: chrome/test/data/extensions/test_file_with_ctrl-d_keybinding.html

Issue 880523005: [Extensions] Simplify Extension Keybinding API Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finnur's Created 5 years, 10 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/test/data/extensions/api_test/keybinding/overwrite_bookmark_shortcut/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <head> 1 <head>
2 <script type="text/javascript"> 2 <script type="text/javascript">
3 var ctrlDown = false; 3 var ctrlDown = false;
4 document.onkeyup = function(e) { 4 document.onkeyup = function(e) {
5 // Ctrl is 17, left Command is 91, right Command is 93 5 // Ctrl is 17, left Command is 91, right Command is 93
6 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93) 6 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93)
7 ctrlDown = false; 7 ctrlDown = false;
8 } 8 }
9 document.onkeydown = function(e) { 9 document.onkeydown = function(e) {
10 // Ctrl is 17, left Command is 91, right Command is 93 10 // Ctrl is 17, left Command is 91, right Command is 93
11 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93) { 11 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93) {
12 ctrlDown = true; 12 ctrlDown = true;
13 } else if (String.fromCharCode(e.keyCode) == 'D' && ctrlDown) { 13 } else if (String.fromCharCode(e.keyCode) == 'D' && ctrlDown) {
14 document.body.bgColor = "magenta"; 14 window.domAutomationController.setAutomationId(0);
15 window.domAutomationController.send('web page received');
15 return false; 16 return false;
16 } 17 }
17 }; 18 };
18 </script> 19 </script>
19 </head> 20 </head>
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/keybinding/overwrite_bookmark_shortcut/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698