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

Unified Diff: net/dns/host_resolver_impl_unittest.cc

Issue 1398973003: Don't use base::MessageLoop::{Quit,QuitClosure} in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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_transaction_unittest.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/dns/host_resolver_impl_unittest.cc
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 2ab20b71378c5ca957a48d1a14679a236e5e8281..ac717496df7170a299f2ba3b858c1d77814f0b11 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -270,7 +270,7 @@ class Request {
int WaitForResult() {
if (completed())
return result_;
- base::CancelableClosure closure(base::MessageLoop::QuitClosure());
+ base::CancelableClosure closure(base::MessageLoop::QuitWhenIdleClosure());
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, closure.callback(), TestTimeouts::action_max_timeout());
quit_on_complete_ = true;
@@ -298,7 +298,7 @@ class Request {
if (handler_)
handler_->Handle(this);
if (quit_on_complete_) {
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
quit_on_complete_ = false;
}
}
@@ -847,7 +847,7 @@ TEST_F(HostResolverImplTest, DeleteWithinCallback) {
// Quit after returning from OnCompleted (to give it a chance at
// incorrectly running the cancelled tasks).
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::MessageLoop::QuitClosure());
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
};
set_handler(new MyHandler());
@@ -873,7 +873,7 @@ TEST_F(HostResolverImplTest, DeleteWithinAbortedCallback) {
// Quit after returning from OnCompleted (to give it a chance at
// incorrectly running the cancelled tasks).
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::MessageLoop::QuitClosure());
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
};
set_handler(new MyHandler());
@@ -951,7 +951,7 @@ TEST_F(HostResolverImplTest, BypassCache) {
CreateRequest(info, DEFAULT_PRIORITY)->Resolve());
} else if (71 == req->info().port()) {
// Test is done.
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
} else {
FAIL() << "Unexpected request";
}
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/dns/mdns_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698