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

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

Issue 2645973006: [Service Manager] Get rid of dynamic service discovery (Closed)
Patch Set: . Created 3 years, 11 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: services/service_manager/runner/host/service_process_launcher_unittest.cc
diff --git a/services/service_manager/runner/host/service_process_launcher_unittest.cc b/services/service_manager/runner/host/service_process_launcher_unittest.cc
index cb6fd54cca4fb13116bd47aa57bb8e70890217c5..866bd5b687c536728721bfbb8eda306f22ad10dd 100644
--- a/services/service_manager/runner/host/service_process_launcher_unittest.cc
+++ b/services/service_manager/runner/host/service_process_launcher_unittest.cc
@@ -15,9 +15,6 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
-#include "base/threading/thread.h"
-#include "mojo/edk/embedder/embedder.h"
-#include "mojo/edk/embedder/scoped_ipc_support.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace service_manager {
@@ -25,8 +22,6 @@ namespace {
const char kTestServiceName[] = "host_test_service";
-const base::FilePath::CharType kPackagesPath[] = FILE_PATH_LITERAL("Packages");
-
#if defined(OS_WIN)
const base::FilePath::CharType kServiceExtension[] =
FILE_PATH_LITERAL(".service.exe");
@@ -71,7 +66,7 @@ class ServiceProcessLauncherDelegateImpl
#else
#define MAYBE_StartJoin StartJoin
#endif // defined(OS_ANDROID)
-TEST(ServieProcessLauncherTest, MAYBE_StartJoin) {
+TEST(ServiceProcessLauncherTest, MAYBE_StartJoin) {
base::FilePath service_manager_dir;
PathService::Get(base::DIR_MODULE, &service_manager_dir);
base::MessageLoop message_loop;
@@ -79,18 +74,10 @@ TEST(ServieProcessLauncherTest, MAYBE_StartJoin) {
new base::SequencedWorkerPool(3, "blocking_pool",
base::TaskPriority::USER_VISIBLE));
- base::Thread io_thread("io_thread");
- base::Thread::Options options;
- options.message_loop_type = base::MessageLoop::TYPE_IO;
- io_thread.StartWithOptions(options);
-
- auto ipc_support = base::MakeUnique<mojo::edk::ScopedIPCSupport>(
- io_thread.task_runner(),
- mojo::edk::ScopedIPCSupport::ShutdownPolicy::CLEAN);
-
- base::FilePath test_service_path =
- base::FilePath(kPackagesPath).AppendASCII(kTestServiceName)
- .AppendASCII(kTestServiceName) .AddExtension(kServiceExtension);
+ base::FilePath test_service_path;
+ base::PathService::Get(base::DIR_EXE, &test_service_path);
+ test_service_path = test_service_path.AppendASCII(kTestServiceName)
+ .AddExtension(kServiceExtension);
ServiceProcessLauncherDelegateImpl service_process_launcher_delegate;
ServiceProcessLauncher launcher(blocking_pool.get(),
@@ -105,7 +92,6 @@ TEST(ServieProcessLauncherTest, MAYBE_StartJoin) {
launcher.Join();
blocking_pool->Shutdown();
- ipc_support.reset();
EXPECT_EQ(1u, service_process_launcher_delegate.get_and_clear_adjust_count());
}
« no previous file with comments | « services/service_manager/runner/host/service_process_launcher.cc ('k') | services/service_manager/service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698