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

Unified Diff: chromeos/network/geolocation_handler_unittest.cc

Issue 2845973003: Use ScopedTaskEnvironment instead of MessageLoopForUI in chromeos tests. (Closed)
Patch Set: 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
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..abb2b4e7c10384bee209fa3166ef19cc72cd6ab9 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,10 @@ namespace chromeos {
class GeolocationHandlerTest : public testing::Test {
public:
- GeolocationHandlerTest() : manager_test_(NULL) {
- }
+ GeolocationHandlerTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI),
+ manager_test_(NULL) {}
stevenjb 2017/04/27 18:39:10 nit: nullptr
fdoray 2017/04/27 20:35:03 Done.
~GeolocationHandlerTest() override {}
@@ -94,7 +96,7 @@ 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_;
WifiAccessPointVector wifi_access_points_;

Powered by Google App Engine
This is Rietveld 408576698