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

Unified Diff: mojo/runner/shell_test_base.cc

Issue 1342503003: Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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: mojo/runner/shell_test_base.cc
diff --git a/mojo/runner/shell_test_base.cc b/mojo/runner/shell_test_base.cc
index 820e664da0d3bdeb34a60efa645ba3c334723104..397e2b912632c197670491661ac734c071997b56 100644
--- a/mojo/runner/shell_test_base.cc
+++ b/mojo/runner/shell_test_base.cc
@@ -30,7 +30,7 @@ void QuitIfRunning() {
} // namespace
-ShellTestBase::ShellTestBase() {
+ShellTestBase::ShellTestBase() : shell_context_(GetTestAppFilePath()) {
}
ShellTestBase::~ShellTestBase() {
@@ -38,7 +38,6 @@ ShellTestBase::~ShellTestBase() {
void ShellTestBase::SetUp() {
CHECK(shell_context_.Init());
- SetUpTestApplications();
}
void ShellTestBase::TearDown() {
@@ -61,15 +60,10 @@ ScopedMessagePipeHandle ShellTestBase::ConnectToService(
}
#if !defined(OS_ANDROID)
-void ShellTestBase::SetUpTestApplications() {
- // Set the URLResolver origin to be the same as the base file path for
- // local files. This is primarily for test convenience, so that references
- // to unknown mojo: URLs that do not have specific local file or custom
- // mappings registered on the URL resolver are treated as shared libraries.
- base::FilePath service_dir;
- CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
- shell_context_.url_resolver()->SetMojoBaseURL(
- util::FilePathToFileURL(service_dir));
+base::FilePath ShellTestBase::GetTestAppFilePath() const {
+ base::FilePath shell_dir;
+ PathService::Get(base::DIR_MODULE, &shell_dir);
+ return shell_dir;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698