OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webdriver_key_converter.h" | 5 #include "chrome/test/webdriver/webdriver_key_converter.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 *client_should_skip = should_skip; | 156 *client_should_skip = should_skip; |
157 return true; | 157 return true; |
158 } | 158 } |
159 | 159 |
160 } // namespace | 160 } // namespace |
161 | 161 |
162 namespace webdriver { | 162 namespace webdriver { |
163 | 163 |
164 WebKeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers) { | 164 WebKeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers) { |
165 return WebKeyEvent(automation::kRawKeyDownType, key_code, "", "", modifiers); | 165 return WebKeyEvent(automation::kRawKeyDownType, |
| 166 key_code, |
| 167 std::string(), |
| 168 std::string(), |
| 169 modifiers); |
166 } | 170 } |
167 | 171 |
168 WebKeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers) { | 172 WebKeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers) { |
169 return WebKeyEvent(automation::kKeyUpType, key_code, "", "", modifiers); | 173 return WebKeyEvent(automation::kKeyUpType, |
| 174 key_code, |
| 175 std::string(), |
| 176 std::string(), |
| 177 modifiers); |
170 } | 178 } |
171 | 179 |
172 WebKeyEvent CreateCharEvent(const std::string& unmodified_text, | 180 WebKeyEvent CreateCharEvent(const std::string& unmodified_text, |
173 const std::string& modified_text, | 181 const std::string& modified_text, |
174 int modifiers) { | 182 int modifiers) { |
175 return WebKeyEvent(automation::kCharType, | 183 return WebKeyEvent(automation::kCharType, |
176 ui::VKEY_UNKNOWN, | 184 ui::VKEY_UNKNOWN, |
177 unmodified_text, | 185 unmodified_text, |
178 modified_text, | 186 modified_text, |
179 modifiers); | 187 modifiers); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 CreateKeyUpEvent(kModifiers[i].key_code, sticky_modifiers)); | 326 CreateKeyUpEvent(kModifiers[i].key_code, sticky_modifiers)); |
319 } | 327 } |
320 } | 328 } |
321 } | 329 } |
322 client_key_events->swap(key_events); | 330 client_key_events->swap(key_events); |
323 *modifiers = sticky_modifiers; | 331 *modifiers = sticky_modifiers; |
324 return true; | 332 return true; |
325 } | 333 } |
326 | 334 |
327 } // namespace webdriver | 335 } // namespace webdriver |
OLD | NEW |