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

Unified Diff: services/service_manager/public/cpp/service_test.h

Issue 2878453002: Use ScopedTaskEnvironment instead of MessageLoop in service_manager::test::ServiceTest. (Closed)
Patch Set: fix-build-error 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/service_test.h
diff --git a/services/service_manager/public/cpp/service_test.h b/services/service_manager/public/cpp/service_test.h
index ca070fb8580d6344b209a40e79857643f00d9eea..ca20fdd6ce3b1ce6022b79f9e1a13ba0db635865 100644
--- a/services/service_manager/public/cpp/service_test.h
+++ b/services/service_manager/public/cpp/service_test.h
@@ -8,12 +8,12 @@
#include <memory>
#include "base/macros.h"
+#include "base/test/scoped_task_environment.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
-class MessageLoop;
class Thread;
}
@@ -80,8 +80,6 @@ class ServiceTest : public testing::Test {
// work.
virtual std::unique_ptr<Service> CreateService();
- virtual std::unique_ptr<base::MessageLoop> CreateMessageLoop();
-
// Call to set OnStart() metadata when GetService() is overridden.
void OnStartCalled(Connector* connector,
const std::string& name,
@@ -94,13 +92,13 @@ class ServiceTest : public testing::Test {
private:
friend ServiceTestClient;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<ServiceContext> context_;
- std::unique_ptr<base::MessageLoop> message_loop_;
std::unique_ptr<BackgroundServiceManager> background_service_manager_;
// See constructor.
std::string test_name_;
- bool init_edk_ = true;
+ bool init_edk_;
std::unique_ptr<base::Thread> ipc_thread_;
std::unique_ptr<mojo::edk::ScopedIPCSupport> ipc_support_;

Powered by Google App Engine
This is Rietveld 408576698