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

Unified Diff: content/browser/browser_thread_unittest.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (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 | « no previous file | content/browser/devtools/devtools_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_thread_unittest.cc
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc
index 9b23057f6232d2a3c538f8c10edd647078441c3b..1c622c2793cb8d68a840aa973bc6f04087e8809c 100644
--- a/content/browser/browser_thread_unittest.cc
+++ b/content/browser/browser_thread_unittest.cc
@@ -19,7 +19,8 @@ class BrowserThreadTest : public testing::Test {
public:
void Release() const {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- loop_.task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ loop_.task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
protected:
@@ -37,8 +38,8 @@ class BrowserThreadTest : public testing::Test {
static void BasicFunction(base::MessageLoop* message_loop) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- message_loop->task_runner()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ message_loop->task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
class DeletedOnFile
@@ -54,8 +55,8 @@ class BrowserThreadTest : public testing::Test {
~DeletedOnFile() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- message_loop_->task_runner()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ message_loop_->task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
base::MessageLoop* message_loop_;
@@ -109,10 +110,8 @@ TEST_F(BrowserThreadTest, PostTaskAndReply) {
// Most of the heavy testing for PostTaskAndReply() is done inside the
// task runner test. This just makes sure we get piped through at all.
ASSERT_TRUE(BrowserThread::PostTaskAndReply(
- BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&base::DoNothing),
- base::Bind(&base::MessageLoop::Quit,
+ BrowserThread::FILE, FROM_HERE, base::Bind(&base::DoNothing),
+ base::Bind(&base::MessageLoop::QuitWhenIdle,
base::Unretained(base::MessageLoop::current()->current()))));
base::MessageLoop::current()->Run();
}
« no previous file with comments | « no previous file | content/browser/devtools/devtools_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698