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

Unified Diff: net/base/network_change_notifier_win_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | « media/midi/midi_manager_win.cc ('k') | net/dns/mdns_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « media/midi/midi_manager_win.cc ('k') | net/dns/mdns_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698