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

Unified Diff: chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (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
Index: chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
index 7d7c657a50895147adb04b17279140ff3ab95649..6bc7b37ae318493c154805c6d50f7db6688452c8 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
@@ -255,7 +255,8 @@ CloudPrintURLFetcherBasicTest::HandleRawResponse(
if (handle_raw_response_) {
// If the current message loop is not the IO loop, it will be shut down when
// the main loop returns and this thread subsequently goes out of scope.
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
return CloudPrintURLFetcher::CONTINUE_PROCESSING;
@@ -269,7 +270,8 @@ CloudPrintURLFetcherBasicTest::HandleRawData(
// We should never get here if we returned true in HandleRawResponse
EXPECT_FALSE(handle_raw_response_);
if (handle_raw_data_) {
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
return CloudPrintURLFetcher::CONTINUE_PROCESSING;
@@ -284,7 +286,8 @@ CloudPrintURLFetcherBasicTest::HandleJSONData(
// We should never get here if we returned true in one of the above methods.
EXPECT_FALSE(handle_raw_response_);
EXPECT_FALSE(handle_raw_data_);
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
@@ -302,7 +305,8 @@ CloudPrintURLFetcherOverloadTest::HandleRawData(
// We have already sent 20 requests continuously. And we expect that
// it takes more than 1 second due to the overload protection settings.
EXPECT_TRUE(Time::Now() - start_time_ >= one_second);
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
return CloudPrintURLFetcher::STOP_PROCESSING;
}
@@ -321,7 +325,8 @@ CloudPrintURLFetcherRetryBackoffTest::HandleRawData(
void CloudPrintURLFetcherRetryBackoffTest::OnRequestGiveUp() {
// It takes more than 200 ms to finish all 11 requests.
EXPECT_TRUE(Time::Now() - start_time_ >= TimeDelta::FromMilliseconds(200));
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
TEST_F(CloudPrintURLFetcherBasicTest, HandleRawResponse) {
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698