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

Unified Diff: chrome/test/webdriver/automation.h

Issue 6482014: Implement sendKeys webdriver API in ChromeDriver. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/webdriver/WEBDRIVER_TESTS ('k') | chrome/test/webdriver/automation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/automation.h
===================================================================
--- chrome/test/webdriver/automation.h (revision 74647)
+++ chrome/test/webdriver/automation.h (working copy)
@@ -10,10 +10,31 @@
#include "base/task.h"
#include "base/ref_counted.h"
#include "base/scoped_temp_dir.h"
+#include "chrome/common/automation_constants.h"
#include "chrome/test/ui/ui_test.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace webdriver {
+struct WebKeyEvent {
+ WebKeyEvent(automation::KeyEventTypes type,
+ ui::KeyboardCode key_code,
+ const std::string& unmodified_text,
+ const std::string& modified_text,
+ int modifiers)
+ : type(type),
+ key_code(key_code),
+ unmodified_text(unmodified_text),
+ modified_text(modified_text),
+ modifiers(modifiers) {}
+
+ automation::KeyEventTypes type;
+ ui::KeyboardCode key_code;
+ std::string unmodified_text;
+ std::string modified_text;
+ int modifiers;
+};
+
// Creates and controls the Chrome instance.
// This class should be created and accessed on a single thread.
// TODO(phajdan.jr): Abstract UITestBase classes, see:
@@ -37,6 +58,10 @@
std::string* result,
bool* success);
+ // Sends a key event to the current browser. Waits until the key has
+ // been processed by the web page.
+ void SendWebKeyEvent(const WebKeyEvent& key_event, bool* success);
+
void NavigateToURL(const std::string& url, bool* success);
void GoForward(bool* success);
void GoBack(bool* success);
« no previous file with comments | « chrome/test/webdriver/WEBDRIVER_TESTS ('k') | chrome/test/webdriver/automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698