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

Side by Side Diff: chrome/test/webdriver/keymap.cc

Issue 7104085: In chromedriver, add /log handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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 | « chrome/test/webdriver/dispatch.cc ('k') | chrome/test/webdriver/server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/webdriver/keymap.h" 5 #include "chrome/test/webdriver/keymap.h"
6 6
7 #include "chrome/browser/automation/ui_controls.h" 7 #include "chrome/browser/automation/ui_controls.h"
8 #include "ui/base/events.h" 8 #include "ui/base/events.h"
9 9
10 namespace webdriver { 10 namespace webdriver {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (shift_ || shifted_keys_.find(key) != shifted_keys_.end()) { 149 if (shift_ || shifted_keys_.find(key) != shifted_keys_.end()) {
150 modifiers = modifiers | ui::EF_SHIFT_DOWN; 150 modifiers = modifiers | ui::EF_SHIFT_DOWN;
151 } 151 }
152 if (control_) { 152 if (control_) {
153 modifiers = modifiers | ui::EF_CONTROL_DOWN; 153 modifiers = modifiers | ui::EF_CONTROL_DOWN;
154 } 154 }
155 if (alt_) { 155 if (alt_) {
156 modifiers = modifiers | ui::EF_ALT_DOWN; 156 modifiers = modifiers | ui::EF_ALT_DOWN;
157 } 157 }
158 if (command_) { 158 if (command_) {
159 VLOG(1) << "Pressing command key on linux!!"; 159 LOG(INFO) << "Pressing command key on linux!!";
160 modifiers = modifiers | ui::EF_COMMAND_DOWN; 160 modifiers = modifiers | ui::EF_COMMAND_DOWN;
161 } 161 }
162 162
163 // TODO(jmikhail): need to be able to capture modifier key up. 163 // TODO(jmikhail): need to be able to capture modifier key up.
164 window->SimulateOSKeyPress(key_code, modifiers); 164 window->SimulateOSKeyPress(key_code, modifiers);
165 165
166 return true; 166 return true;
167 } 167 }
168 168
169 void KeyMap::ClearModifiers() { 169 void KeyMap::ClearModifiers() {
170 shift_ = false; 170 shift_ = false;
171 alt_ = false; 171 alt_ = false;
172 control_ = false; 172 control_ = false;
173 command_ = false; 173 command_ = false;
174 } 174 }
175 175
176 } // namespace webdriver 176 } // namespace webdriver
177 177
OLDNEW
« no previous file with comments | « chrome/test/webdriver/dispatch.cc ('k') | chrome/test/webdriver/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698