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

Unified Diff: device/geolocation/wifi_data_provider_linux_unittest.cc

Issue 2849613002: Use ScopedTaskEnvironment instead of MessageLoopForUI in device tests. (Closed)
Patch Set: self-review 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 | « device/geolocation/wifi_data_provider_common_unittest.cc ('k') | device/u2f/u2f_register_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/wifi_data_provider_linux_unittest.cc
diff --git a/device/geolocation/wifi_data_provider_linux_unittest.cc b/device/geolocation/wifi_data_provider_linux_unittest.cc
index c5b0eb474efb11476e7c597f108c208b19d418a5..1153a3968354135de9948f28ab5a2a8c042548a9 100644
--- a/device/geolocation/wifi_data_provider_linux_unittest.cc
+++ b/device/geolocation/wifi_data_provider_linux_unittest.cc
@@ -10,8 +10,8 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_task_environment.h"
#include "dbus/message.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_object_proxy.h"
@@ -97,9 +97,13 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
}
protected:
+ GeolocationWifiDataProviderLinuxTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+
// WifiDataProvider requires a task runner to be present. The |message_loop_|
// is defined here, as it should outlive |wifi_provider_linux_|.
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
scoped_refptr<dbus::MockBus> mock_bus_;
scoped_refptr<dbus::MockObjectProxy> mock_network_manager_proxy_;
scoped_refptr<dbus::MockObjectProxy> mock_access_point_proxy_;
« no previous file with comments | « device/geolocation/wifi_data_provider_common_unittest.cc ('k') | device/u2f/u2f_register_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698