Index: chromeos/network/shill_property_handler_unittest.cc |
diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc |
index 47e169e4e4506e4bb0c9973453ed5d62527b7721..d389879454ce24f6ba3c30d84cded593adafe4d3 100644 |
--- a/chromeos/network/shill_property_handler_unittest.cc |
+++ b/chromeos/network/shill_property_handler_unittest.cc |
@@ -13,8 +13,8 @@ |
#include "base/bind.h" |
#include "base/macros.h" |
-#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
+#include "base/test/scoped_task_environment.h" |
#include "base/values.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/shill_device_client.h" |
@@ -163,11 +163,12 @@ class TestListener : public internal::ShillPropertyHandler::Listener { |
class ShillPropertyHandlerTest : public testing::Test { |
public: |
ShillPropertyHandlerTest() |
- : manager_test_(NULL), |
+ : scoped_task_environment_( |
+ base::test::ScopedTaskEnvironment::MainThreadType::UI), |
+ manager_test_(NULL), |
device_test_(NULL), |
service_test_(NULL), |
- profile_test_(NULL) { |
- } |
+ profile_test_(NULL) {} |
~ShillPropertyHandlerTest() override {} |
void SetUp() override { |
@@ -285,7 +286,7 @@ class ShillPropertyHandlerTest : public testing::Test { |
AddService(shill::kTypeCellular, "stub_cellular1", shill::kStateIdle); |
} |
- base::MessageLoopForUI message_loop_; |
+ base::test::ScopedTaskEnvironment scoped_task_environment_; |
std::unique_ptr<TestListener> listener_; |
std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_; |
ShillManagerClient::TestInterface* manager_test_; |