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

Side by Side Diff: chrome/test/webdriver/webdriver_key_converter.h

Issue 6694007: Small test and ChromeDriver fixes to enable additional tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Dennis' comments Created 9 years, 9 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/session.cc ('k') | chrome/test/webdriver/webdriver_key_converter.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 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/test/webdriver/automation.h" 13 #include "chrome/test/webdriver/automation.h"
14 #include "ui/base/keycodes/keyboard_codes.h" 14 #include "ui/base/keycodes/keyboard_codes.h"
15 15
16 namespace webdriver { 16 namespace webdriver {
17 17
18 // Convenience functions for creating |WebKeyEvent|s. Used by unittests. 18 // Convenience functions for creating |WebKeyEvent|s. Used by unittests.
19 WebKeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers); 19 WebKeyEvent CreateKeyDownEvent(ui::KeyboardCode key_code, int modifiers);
20 WebKeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers); 20 WebKeyEvent CreateKeyUpEvent(ui::KeyboardCode key_code, int modifiers);
21 WebKeyEvent CreateCharEvent(const std::string& unmodified_text, 21 WebKeyEvent CreateCharEvent(const std::string& unmodified_text,
22 const std::string& modified_text, 22 const std::string& modified_text,
23 int modifiers); 23 int modifiers);
24 24
25 // Converts keys into appropriate |WebKeyEvent|s. 25 // Converts keys into appropriate |WebKeyEvent|s. This will do a best effort
26 void ConvertKeysToWebKeyEvents(const string16& keys, 26 // conversion. However, if the input is invalid it will return false and set
27 std::vector<WebKeyEvent>* key_events); 27 // an error message.
28 bool ConvertKeysToWebKeyEvents(const string16& keys,
29 std::vector<WebKeyEvent>* key_events,
30 std::string* error_msg);
28 31
29 } // namespace webdriver 32 } // namespace webdriver
30 33
31 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_ 34 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_KEY_CONVERTER_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/session.cc ('k') | chrome/test/webdriver/webdriver_key_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698