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

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

Issue 6630001: Allow webdriver users to choose between sending the key events when... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/automation.cc
===================================================================
--- chrome/test/webdriver/automation.cc (revision 77600)
+++ chrome/test/webdriver/automation.cc (working copy)
@@ -219,6 +219,7 @@
void Automation::SendWebKeyEvent(int tab_id,
const WebKeyEvent& key_event,
+ bool use_native_events,
bool* success) {
int windex = 0, tab_index = 0;
if (!GetIndicesForTab(tab_id, &windex, &tab_index)) {
@@ -226,8 +227,13 @@
return;
}
- *success = SendWebKeyEventJSONRequest(
- automation(), windex, tab_index, key_event);
+ if (use_native_events) {
+ *success = SendNativeWebKeyEventJSONRequest(
+ automation(), windex, tab_index, key_event);
+ } else {
+ *success = SendWebKeyEventJSONRequest(
+ automation(), windex, tab_index, key_event);
+ }
}
void Automation::NavigateToURL(int tab_id,

Powered by Google App Engine
This is Rietveld 408576698