| Index: chromeos/network/geolocation_handler_unittest.cc
|
| diff --git a/chromeos/network/geolocation_handler_unittest.cc b/chromeos/network/geolocation_handler_unittest.cc
|
| index 7cf1fc9cf3053805703173589fda087e2d48e613..49a98464e0395faa8acd6eba2f412537d6f2e152 100644
|
| --- a/chromeos/network/geolocation_handler_unittest.cc
|
| +++ b/chromeos/network/geolocation_handler_unittest.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #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/values.h"
|
| @@ -34,7 +35,7 @@ class GeolocationHandlerTest : public testing::Test {
|
| ASSERT_TRUE(manager_test_);
|
| geolocation_handler_.reset(new GeolocationHandler());
|
| geolocation_handler_->Init();
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| void TearDown() override {
|
| @@ -61,7 +62,7 @@ class GeolocationHandlerTest : public testing::Test {
|
| properties.SetStringWithoutPathExpansion(
|
| shill::kGeoSignalStrengthProperty, strength);
|
| manager_test_->AddGeoNetwork(shill::kTypeWifi, properties);
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| protected:
|
| @@ -77,7 +78,7 @@ class GeolocationHandlerTest : public testing::Test {
|
| TEST_F(GeolocationHandlerTest, NoAccessPoints) {
|
| // Inititial call should return false.
|
| EXPECT_FALSE(GetWifiAccessPoints());
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Second call should return false since there are no devices.
|
| EXPECT_FALSE(GetWifiAccessPoints());
|
| }
|
| @@ -85,10 +86,10 @@ TEST_F(GeolocationHandlerTest, NoAccessPoints) {
|
| TEST_F(GeolocationHandlerTest, OneAccessPoint) {
|
| // Add an acces point.
|
| AddAccessPoint(1);
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Inititial call should return false and request access points.
|
| EXPECT_FALSE(GetWifiAccessPoints());
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Second call should return true since we have an access point.
|
| EXPECT_TRUE(GetWifiAccessPoints());
|
| ASSERT_EQ(1u, wifi_access_points_.size());
|
| @@ -101,10 +102,10 @@ TEST_F(GeolocationHandlerTest, MultipleAccessPoints) {
|
| AddAccessPoint(1);
|
| AddAccessPoint(2);
|
| AddAccessPoint(3);
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Inititial call should return false and request access points.
|
| EXPECT_FALSE(GetWifiAccessPoints());
|
| - message_loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Second call should return true since we have an access point.
|
| EXPECT_TRUE(GetWifiAccessPoints());
|
| ASSERT_EQ(3u, wifi_access_points_.size());
|
|
|