| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "base/string16.h" |
| 13 #include "chrome/test/webdriver/automation.h" |
| 14 #include "ui/base/keycodes/keyboard_codes.h" |
| 15 |
| 16 namespace webdriver { |
| 17 |
| 18 // Convenience functions for creating |WebKeyEvent|s. Used by unittests. |
| 19 WebKeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers); |
| 20 WebKeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers); |
| 21 WebKeyEvent CreateCharEvent(const std::string& unmodified_text, |
| 22 const std::string& modified_text, |
| 23 int modifiers); |
| 24 |
| 25 // Converts keys into appropriate |WebKeyEvent|s. |
| 26 void ConvertKeysToWebKeyEvents(const string16& keys, |
| 27 std::vector<WebKeyEvent>* key_events); |
| 28 |
| 29 } // namespace webdriver |
| 30 |
| 31 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ |
| OLD | NEW |