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

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

Issue 2897123004: Move display_service_unittests to services_unittests. (Closed)
Patch Set: services -> service_manager Created 3 years, 7 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/common_initialization.cc
diff --git a/services/service_manager/public/cpp/test/run_all_service_tests.cc b/services/service_manager/public/cpp/test/common_initialization.cc
similarity index 78%
copy from services/service_manager/public/cpp/test/run_all_service_tests.cc
copy to services/service_manager/public/cpp/test/common_initialization.cc
index 41e53eb85ec87cdd62456c16684c229be27728f0..c21cb751c02228e1fafa277eafd1ca021c156d4b 100644
--- a/services/service_manager/public/cpp/test/run_all_service_tests.cc
+++ b/services/service_manager/public/cpp/test/common_initialization.cc
@@ -1,10 +1,11 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "services/service_manager/public/cpp/test/common_initialization.h"
+
#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 "base/values.h"
#include "mojo/edk/embedder/embedder.h"
@@ -21,9 +22,12 @@
#include "services/service_manager/public/cpp/standalone_service/mach_broker.h"
#endif
-int main(int argc, char** argv) {
- base::TestSuite test_suite(argc, argv);
+namespace service_manager {
+int InitializeAndLaunchUnitTests(
+ int argc,
+ char** argv,
+ const base::RunTestSuiteCallback& run_test_suite) {
catalog::Catalog::SetDefaultCatalogManifest(
service_manager::test::CreateTestCatalog());
@@ -45,7 +49,7 @@ int main(int argc, char** argv) {
ipc_thread.task_runner(),
mojo::edk::ScopedIPCSupport::ShutdownPolicy::CLEAN);
- return base::LaunchUnitTests(
- argc, argv,
- base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
+ return base::LaunchUnitTests(argc, argv, run_test_suite);
}
+
+} // namespace service_manager

Powered by Google App Engine
This is Rietveld 408576698