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

Unified Diff: services/service_manager/public/cpp/test/run_all_service_tests.cc

Issue 2658063003: Misc service_manager and service test cleanup (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/public/cpp/test/run_all_service_tests.cc
diff --git a/services/service_manager/public/cpp/test/run_all_service_tests.cc b/services/service_manager/public/cpp/test/run_all_service_tests.cc
index 20e1a929ebc6fe4477abf8b96f88e84b6f5fad0f..8d02f3fe4471b440d6bb24c8b122d549cb6d6221 100644
--- a/services/service_manager/public/cpp/test/run_all_service_tests.cc
+++ b/services/service_manager/public/cpp/test/run_all_service_tests.cc
@@ -2,14 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/message_loop/message_loop.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
+#include "base/threading/thread.h"
#include "mojo/edk/embedder/embedder.h"
-#include "services/service_manager/background/background_service_manager_main.h"
+#include "mojo/edk/embedder/scoped_ipc_support.h"
+#include "services/catalog/catalog.h"
+#include "services/service_manager/public/cpp/test/service_test_catalog.h"
-int MasterProcessMain(int argc, char** argv) {
+int main(int argc, char** argv) {
base::TestSuite test_suite(argc, argv);
+
+ catalog::Catalog::SetDefaultCatalogManifest(
+ service_manager::test::CreateTestCatalog());
+
mojo::edk::Init();
+
+ base::Thread ipc_thread("IPC thread");
+ ipc_thread.StartWithOptions(
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
+ mojo::edk::ScopedIPCSupport ipc_support(
+ ipc_thread.task_runner(),
+ mojo::edk::ScopedIPCSupport::ShutdownPolicy::CLEAN);
+
return base::LaunchUnitTests(
argc, argv,
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));

Powered by Google App Engine
This is Rietveld 408576698