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

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 78866)
+++ chrome/test/webdriver/automation.cc (working copy)
@@ -219,6 +219,20 @@
automation(), windex, tab_index, start.x(), start.y(), end.x(), end.y());
}
+void Automation::SendNativeKeyEvent(int tab_id,
kkania 2011/03/24 23:20:32 put this func after SendWebKeyEvent to match heade
timothe 2011/03/25 11:07:59 Done.
+ ui::KeyboardCode key_code,
+ int modifiers,
+ bool* success) {
+ int windex = 0, tab_index = 0;
+ if (!GetIndicesForTab(tab_id, &windex, &tab_index)) {
+ *success = false;
+ return;
+ }
+ *success = SendNativeKeyEventJSONRequest(
+ automation(), windex, tab_index, key_code, modifiers);
+}
+
+
void Automation::SendWebKeyEvent(int tab_id,
const WebKeyEvent& key_event,
bool* success) {
@@ -227,7 +241,6 @@
*success = false;
return;
}
-
*success = SendWebKeyEventJSONRequest(
automation(), windex, tab_index, key_event);
}

Powered by Google App Engine
This is Rietveld 408576698