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

Side by Side Diff: chrome/test/webdriver/commands/create_session.cc

Issue 7648053: [chromedriver] Add chrome.detach option for configuring Chrome not to quit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile issue Created 9 years, 4 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/commands/command.cc ('k') | chrome/test/webdriver/commands/response.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 #include "chrome/test/webdriver/commands/create_session.h" 5 #include "chrome/test/webdriver/commands/create_session.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 Session::Options session_options; 192 Session::Options session_options;
193 Error* error = NULL; 193 Error* error = NULL;
194 error = GetBooleanCapability(capabilities, "chrome.nativeEvents", 194 error = GetBooleanCapability(capabilities, "chrome.nativeEvents",
195 &session_options.use_native_events); 195 &session_options.use_native_events);
196 if (!error) { 196 if (!error) {
197 error = GetBooleanCapability(capabilities, "chrome.loadAsync", 197 error = GetBooleanCapability(capabilities, "chrome.loadAsync",
198 &session_options.load_async); 198 &session_options.load_async);
199 } 199 }
200 if (!error) {
201 error = GetBooleanCapability(capabilities, "chrome.detach",
202 &browser_options.detach_process);
203 }
200 if (error) { 204 if (error) {
201 response->SetError(error); 205 response->SetError(error);
202 return; 206 return;
203 } 207 }
204 208
205 // Session manages its own liftime, so do not call delete. 209 // Session manages its own liftime, so do not call delete.
206 Session* session = new Session(session_options); 210 Session* session = new Session(session_options);
207 error = session->Init(browser_options); 211 error = session->Init(browser_options);
208 if (error) { 212 if (error) {
209 response->SetError(error); 213 response->SetError(error);
(...skipping 15 matching lines...) Expand all
225 // difficult, and returning the hostname causes perf problems with the python 229 // difficult, and returning the hostname causes perf problems with the python
226 // bindings on Windows. 230 // bindings on Windows.
227 std::ostringstream stream; 231 std::ostringstream stream;
228 stream << SessionManager::GetInstance()->url_base() << "/session/" 232 stream << SessionManager::GetInstance()->url_base() << "/session/"
229 << session->id(); 233 << session->id();
230 response->SetStatus(kSeeOther); 234 response->SetStatus(kSeeOther);
231 response->SetValue(Value::CreateStringValue(stream.str())); 235 response->SetValue(Value::CreateStringValue(stream.str()));
232 } 236 }
233 237
234 } // namespace webdriver 238 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/command.cc ('k') | chrome/test/webdriver/commands/response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698