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

Unified Diff: chrome/test/webdriver/commands/create_session.cc

Issue 23526047: Delete old chromedriver code, and remove mongoose webserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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
diff --git a/chrome/test/webdriver/commands/create_session.cc b/chrome/test/webdriver/commands/create_session.cc
deleted file mode 100644
index ef53ee79a052021ce70d9efacd98530c968010c1..0000000000000000000000000000000000000000
--- a/chrome/test/webdriver/commands/create_session.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/webdriver/commands/create_session.h"
-
-#include <string>
-
-#include "base/command_line.h"
-#include "base/files/file_path.h"
-#include "base/files/scoped_temp_dir.h"
-#include "base/values.h"
-#include "chrome/test/webdriver/commands/response.h"
-#include "chrome/test/webdriver/webdriver_error.h"
-#include "chrome/test/webdriver/webdriver_session.h"
-#include "chrome/test/webdriver/webdriver_session_manager.h"
-
-namespace webdriver {
-
-CreateSession::CreateSession(const std::vector<std::string>& path_segments,
- const base::DictionaryValue* const parameters)
- : Command(path_segments, parameters) {}
-
-CreateSession::~CreateSession() {}
-
-bool CreateSession::DoesPost() { return true; }
-
-void CreateSession::ExecutePost(Response* const response) {
- const base::DictionaryValue* dict;
- if (!GetDictionaryParameter("desiredCapabilities", &dict)) {
- response->SetError(new Error(
- kBadRequest, "Missing or invalid 'desiredCapabilities'"));
- return;
- }
-
- // Session manages its own liftime, so do not call delete.
- Session* session = new Session();
- Error* error = session->Init(dict);
- if (error) {
- response->SetError(error);
- return;
- }
-
- // Redirect to a relative URI. Although prohibited by the HTTP standard,
- // this is what the IEDriver does. Finding the actual IP address is
- // difficult, and returning the hostname causes perf problems with the python
- // bindings on Windows.
- std::ostringstream stream;
- stream << SessionManager::GetInstance()->url_base() << "/session/"
- << session->id();
- response->SetStatus(kSeeOther);
- response->SetValue(new base::StringValue(stream.str()));
-}
-
-} // namespace webdriver
« no previous file with comments | « chrome/test/webdriver/commands/create_session.h ('k') | chrome/test/webdriver/commands/execute_async_script_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698