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

Unified Diff: mojo/shell/shell_test_base.cc

Issue 343843002: mojo: remove need for ShellTestBase::InitMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « mojo/shell/shell_test_base.h ('k') | mojo/shell/shell_test_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell_test_base.cc
diff --git a/mojo/shell/shell_test_base.cc b/mojo/shell/shell_test_base.cc
index 947e70efdc17a88f31cf6bcc5c82adce00f2d312..83403c4d0f0dd86f08b4f730f9d46bb7dc2e8112 100644
--- a/mojo/shell/shell_test_base.cc
+++ b/mojo/shell/shell_test_base.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "build/build_config.h"
-#include "mojo/shell/context.h"
#include "net/base/filename_util.h"
#include "url/gurl.h"
@@ -24,20 +23,10 @@ ShellTestBase::ShellTestBase() {
ShellTestBase::~ShellTestBase() {
}
-void ShellTestBase::InitMojo() {
- DCHECK(!message_loop_);
- DCHECK(!shell_context_);
- message_loop_.reset(new base::MessageLoop());
- shell_context_.reset(new Context());
-}
-
void ShellTestBase::LaunchServiceInProcess(
const GURL& service_url,
const std::string& service_name,
ScopedMessagePipeHandle client_handle) {
- DCHECK(message_loop_);
- DCHECK(shell_context_);
-
base::FilePath base_dir;
CHECK(PathService::Get(base::DIR_EXE, &base_dir));
// On android, the library is bundled with the app.
@@ -51,10 +40,10 @@ void ShellTestBase::LaunchServiceInProcess(
// On Linux, they're under lib/.
base::FilePath service_dir(base_dir.AppendASCII("lib"));
#endif
- shell_context_->mojo_url_resolver()->set_origin(
+ shell_context_.mojo_url_resolver()->set_origin(
net::FilePathToFileURL(service_dir).spec());
- shell_context_->service_manager()->ConnectToService(
+ shell_context_.service_manager()->ConnectToService(
service_url, service_name, client_handle.Pass(), GURL());
}
« no previous file with comments | « mojo/shell/shell_test_base.h ('k') | mojo/shell/shell_test_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698