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

Unified Diff: services/service_manager/runner/host/child_process_host_unittest.cc

Issue 2557213002: Build services as standalone executables (Closed)
Patch Set: remove DCHECKs with side effects -_- Created 4 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
Index: services/service_manager/runner/host/child_process_host_unittest.cc
diff --git a/services/service_manager/runner/host/child_process_host_unittest.cc b/services/service_manager/runner/host/child_process_host_unittest.cc
index 4ccee5380dad4be4f6666df2b4d0100b6648b676..a88049291e83a2ba5ed6672a363e35fc68414a28 100644
--- a/services/service_manager/runner/host/child_process_host_unittest.cc
+++ b/services/service_manager/runner/host/child_process_host_unittest.cc
@@ -26,6 +26,12 @@
namespace service_manager {
namespace {
+const char kTestServiceName[] = "host_test_service";
+
+const base::FilePath::CharType kPackagesPath[] = FILE_PATH_LITERAL("Packages");
+const base::FilePath::CharType kServiceExtension[] =
+ FILE_PATH_LITERAL(".service");
+
void ProcessReadyCallbackAdapater(const base::Closure& callback,
base::ProcessId process_id) {
callback.Run();
@@ -71,8 +77,6 @@ class NativeRunnerDelegateImpl : public NativeRunnerDelegate {
#else
#define MAYBE_StartJoin StartJoin
#endif // defined(OS_ANDROID)
-// Just tests starting the child process and joining it (without starting an
-// app).
TEST(ChildProcessHostTest, MAYBE_StartJoin) {
base::FilePath service_manager_dir;
PathService::Get(base::DIR_MODULE, &service_manager_dir);
@@ -89,10 +93,14 @@ TEST(ChildProcessHostTest, MAYBE_StartJoin) {
ProcessDelegate delegate;
mojo::edk::InitIPCSupport(&delegate, io_thread.task_runner());
+ base::FilePath test_service_path =
+ base::FilePath(kPackagesPath).AppendASCII(kTestServiceName)
+ .AppendASCII(kTestServiceName) .AddExtension(kServiceExtension);
+
NativeRunnerDelegateImpl native_runner_delegate;
ChildProcessHost child_process_host(blocking_pool.get(),
&native_runner_delegate, false,
- Identity(), base::FilePath());
+ Identity(), test_service_path);
base::RunLoop run_loop;
child_process_host.Start(
Identity(),

Powered by Google App Engine
This is Rietveld 408576698