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

Unified Diff: chromeos/network/geolocation_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/firewall_hole_unittest.cc ('k') | chromeos/network/network_device_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/geolocation_handler_unittest.cc
diff --git a/chromeos/network/geolocation_handler_unittest.cc b/chromeos/network/geolocation_handler_unittest.cc
index 9d5dc9f2cdd84534fcfee8e4e3a55cb662c63f93..13375ac2dcced383533e1fa92e2659da37c2b1f1 100644
--- a/chromeos/network/geolocation_handler_unittest.cc
+++ b/chromeos/network/geolocation_handler_unittest.cc
@@ -7,10 +7,10 @@
#include <memory>
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/test/scoped_task_environment.h"
#include "base/values.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/shill_manager_client.h"
@@ -21,8 +21,9 @@ namespace chromeos {
class GeolocationHandlerTest : public testing::Test {
public:
- GeolocationHandlerTest() : manager_test_(NULL) {
- }
+ GeolocationHandlerTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
~GeolocationHandlerTest() override {}
@@ -94,9 +95,9 @@ class GeolocationHandlerTest : public testing::Test {
}
protected:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<GeolocationHandler> geolocation_handler_;
- ShillManagerClient::TestInterface* manager_test_;
+ ShillManagerClient::TestInterface* manager_test_ = nullptr;
WifiAccessPointVector wifi_access_points_;
CellTowerVector cell_towers_;
« no previous file with comments | « chromeos/network/firewall_hole_unittest.cc ('k') | chromeos/network/network_device_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698