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

Unified Diff: shell/shell_test_base.cc

Issue 815993004: Run shell tests on android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years 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 | « shell/shell_test_base.h ('k') | shell/shell_test_base_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/shell_test_base.cc
diff --git a/shell/shell_test_base.cc b/shell/shell_test_base.cc
index daeef191b883157926c56326cf3203473ae36102..4c616e2430969b29f3452b507456a2a1c18d8604 100644
--- a/shell/shell_test_base.cc
+++ b/shell/shell_test_base.cc
@@ -24,14 +24,19 @@ ShellTestBase::~ShellTestBase() {
}
void ShellTestBase::SetUp() {
+ SetUpTestApplications();
shell_context_.Init();
- base::FilePath service_dir;
- CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
}
ScopedMessagePipeHandle ShellTestBase::ConnectToService(
const GURL& application_url,
const std::string& service_name) {
+ return shell_context_.ConnectToServiceByName(application_url, service_name)
+ .Pass();
+}
+
+#if !defined(OS_ANDROID)
+void ShellTestBase::SetUpTestApplications() {
// Set the MojoURLResolver 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
@@ -40,17 +45,8 @@ ScopedMessagePipeHandle ShellTestBase::ConnectToService(
CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
shell_context_.mojo_url_resolver()->SetBaseURL(
FilePathToFileURL(service_dir));
-
- return shell_context_.ConnectToServiceByName(application_url, service_name)
- .Pass();
-}
-
-ScopedMessagePipeHandle ShellTestBase::ConnectToServiceViaNetwork(
- const GURL& application_url,
- const std::string& service_name) {
- return shell_context_.ConnectToServiceByName(application_url, service_name)
- .Pass();
}
+#endif
} // namespace test
} // namespace shell
« no previous file with comments | « shell/shell_test_base.h ('k') | shell/shell_test_base_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698