| Index: net/base/network_change_notifier_win_unittest.cc
|
| diff --git a/net/base/network_change_notifier_win_unittest.cc b/net/base/network_change_notifier_win_unittest.cc
|
| index 083a744c70253fc2ff4229582d14ccfae14bdb06..40dc42df66da65c94a2253e485e268753f0954bf 100644
|
| --- a/net/base/network_change_notifier_win_unittest.cc
|
| +++ b/net/base/network_change_notifier_win_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
| #include "net/base/network_change_notifier.h"
|
| #include "net/base/network_change_notifier_factory.h"
|
| #include "net/base/network_change_notifier_win.h"
|
| @@ -89,7 +90,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
|
|
| // If a task to notify observers of the IP address change event was
|
| // incorrectly posted, make sure it gets run to trigger a failure.
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Calls WatchForAddressChange, and simulates a WatchForAddressChangeInternal
|
| @@ -112,7 +113,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
|
|
| // If a task to notify observers of the IP address change event was
|
| // incorrectly posted, make sure it gets run.
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Simulates a network change event, resulting in a call to OnObjectSignaled.
|
| @@ -132,7 +133,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
| EXPECT_EQ(0, network_change_notifier_.sequential_failures());
|
|
|
| // Run the task to notify observers of the IP address change event.
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Simulates a network change event, resulting in a call to OnObjectSignaled.
|
| @@ -154,7 +155,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
| EXPECT_LT(0, network_change_notifier_.sequential_failures());
|
|
|
| // Run the task to notify observers of the IP address change event.
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Runs the message loop until WatchForAddressChange is called again, as a
|
| @@ -172,7 +173,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
| EXPECT_CALL(network_change_notifier_, WatchForAddressChangeInternal())
|
| .Times(1).WillOnce(Return(true));
|
|
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
|
|
| EXPECT_TRUE(network_change_notifier_.is_watching());
|
| EXPECT_EQ(0, network_change_notifier_.sequential_failures());
|
| @@ -196,7 +197,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
| .Times(AtLeast(1))
|
| .WillRepeatedly(Invoke(ExitMessageLoopAndReturnFalse));
|
|
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
|
|
| EXPECT_FALSE(network_change_notifier_.is_watching());
|
| EXPECT_LT(initial_sequential_failures,
|
| @@ -204,7 +205,7 @@ class NetworkChangeNotifierWinTest : public testing::Test {
|
|
|
| // If a task to notify observers of the IP address change event was
|
| // incorrectly posted, make sure it gets run.
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| private:
|
|
|