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

Unified Diff: net/dns/dns_transaction_unittest.cc

Issue 2090613002: Remove calls to deprecated MessageLoop methods in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/dns/dns_config_service_unittest.cc ('k') | net/dns/host_resolver_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction_unittest.cc
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 2ae26138641af8861d457693f4c1d755560c38d3..b33c8a655216f8a3d56da89c5e51f5d0e9cac8af 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
+#include "base/run_loop.h"
#include "base/sys_byteorder.h"
#include "base/test/test_timeouts.h"
#include "net/base/ip_address.h"
@@ -304,7 +305,7 @@ class TransactionHelper {
bool Run(DnsTransactionFactory* factory) {
StartTransaction(factory);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
return has_completed();
}
@@ -312,7 +313,7 @@ class TransactionHelper {
bool RunUntilDone(DnsTransactionFactory* factory) {
set_quit_in_callback();
StartTransaction(factory);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
return has_completed();
}
@@ -497,7 +498,7 @@ TEST_F(DnsTransactionTest, ConcurrentLookup) {
TransactionHelper helper1(kT1HostName, kT1Qtype, kT1RecordCount);
helper1.StartTransaction(transaction_factory_.get());
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(helper0.has_completed());
EXPECT_TRUE(helper1.has_completed());
@@ -516,7 +517,7 @@ TEST_F(DnsTransactionTest, CancelLookup) {
helper0.Cancel();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(helper0.has_completed());
EXPECT_TRUE(helper1.has_completed());
@@ -532,7 +533,7 @@ TEST_F(DnsTransactionTest, DestroyFactory) {
// Destroying the client does not affect running requests.
transaction_factory_.reset(NULL);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(helper0.has_completed());
}
« no previous file with comments | « net/dns/dns_config_service_unittest.cc ('k') | net/dns/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698