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

Unified Diff: chrome/test/webdriver/commands/create_session.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/commands/create_session.cc
===================================================================
--- chrome/test/webdriver/commands/create_session.cc (revision 76851)
+++ chrome/test/webdriver/commands/create_session.cc (working copy)
@@ -28,6 +28,12 @@
void CreateSession::ExecutePost(Response* const response) {
SessionManager* session_manager = SessionManager::GetInstance();
+ bool native_events_required = false;
+ DictionaryValue* capabilities = NULL;
+ if (GetDictionaryParameter("desiredCapabilities", &capabilities)) {
+ capabilities->GetBoolean("chrome.nativeEvents", &native_events_required);
+ }
+
// Session manages its own liftime, so do not call delete.
Session* session = new Session();
if (!session->Init(session_manager->chrome_dir())) {
@@ -36,6 +42,7 @@
kInternalServerError);
return;
}
+ session->set_use_native_events(native_events_required);
timothe faudot 2011/03/07 10:38:27 Should I add a parameter to the Session::Init() me
VLOG(1) << "Created session " << session->id();
std::ostringstream stream;

Powered by Google App Engine
This is Rietveld 408576698