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

Unified Diff: net/dns/mdns_client_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 | « net/base/network_change_notifier_win_unittest.cc ('k') | net/http/transport_security_persister_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_client_unittest.cc
diff --git a/net/dns/mdns_client_unittest.cc b/net/dns/mdns_client_unittest.cc
index d0e6dfb6adcbed31456bafb3543c8909ef18b558..8edf48e7ecc58d214419b8ad234c87e038e17ef8 100644
--- a/net/dns/mdns_client_unittest.cc
+++ b/net/dns/mdns_client_unittest.cc
@@ -11,6 +11,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/clock.h"
@@ -465,7 +466,7 @@ void MDnsTest::RunFor(base::TimeDelta time_period) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, callback.callback(), time_period);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
callback.Cancel();
}
@@ -1185,7 +1186,7 @@ TEST_F(MDnsConnectionTest, ReceiveAsynchronous) {
EXPECT_CALL(delegate_, HandlePacketInternal(sample_packet_));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(MDnsConnectionTest, Error) {
@@ -1200,7 +1201,7 @@ TEST_F(MDnsConnectionTest, Error) {
EXPECT_CALL(delegate_, OnConnectionError(ERR_SOCKET_NOT_CONNECTED));
callback.Run(ERR_SOCKET_NOT_CONNECTED);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
class MDnsConnectionSendTest : public MDnsConnectionTest {
@@ -1235,7 +1236,7 @@ TEST_F(MDnsConnectionSendTest, SendError) {
connection_.Send(sample_buffer_, sample_packet_.size());
EXPECT_CALL(delegate_, OnConnectionError(ERR_SOCKET_NOT_CONNECTED));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(MDnsConnectionSendTest, SendQueued) {
« no previous file with comments | « net/base/network_change_notifier_win_unittest.cc ('k') | net/http/transport_security_persister_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698