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

Unified Diff: chromeos/network/shill_property_handler_unittest.cc

Issue 2845973003: Use ScopedTaskEnvironment instead of MessageLoopForUI in chromeos tests. (Closed)
Patch Set: CR Created 3 years, 8 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
« no previous file with comments | « chromeos/network/prohibited_technologies_handler_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chromeos/network/prohibited_technologies_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698