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

Unified Diff: base/message_pump_glib_unittest.cc

Issue 11794032: base: Update the calls from MessageLoop::Quit() to QuitWhenIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « base/message_loop_unittest.cc ('k') | base/synchronization/waitable_event_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_glib_unittest.cc
diff --git a/base/message_pump_glib_unittest.cc b/base/message_pump_glib_unittest.cc
index e23cc1ed205fa30a2afd44440f2fa8c17593a8be..4b6b6d478cd39727c6108bf9fe46601494140327 100644
--- a/base/message_pump_glib_unittest.cc
+++ b/base/message_pump_glib_unittest.cc
@@ -311,7 +311,7 @@ class ConcurrentHelper : public base::RefCounted<ConcurrentHelper> {
--task_count_;
}
if (task_count_ == 0 && event_count_ == 0) {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
} else {
MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&ConcurrentHelper::FromTask, this));
@@ -323,7 +323,7 @@ class ConcurrentHelper : public base::RefCounted<ConcurrentHelper> {
--event_count_;
}
if (task_count_ == 0 && event_count_ == 0) {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
} else {
injector_->AddEventAsTask(
0, base::Bind(&ConcurrentHelper::FromEvent, this));
@@ -353,7 +353,7 @@ TEST_F(MessagePumpGLibTest, TestConcurrentEventPostedTask) {
// We use the helper class above. We keep both event and posted task queues
// full, the helper verifies that both tasks and events get processed.
// If that is not the case, either event_count_ or task_count_ will not get
- // to 0, and MessageLoop::Quit() will never be called.
+ // to 0, and MessageLoop::QuitWhenIdle() will never be called.
scoped_refptr<ConcurrentHelper> helper = new ConcurrentHelper(injector());
// Add 2 events to the queue to make sure it is always full (when we remove
@@ -514,7 +514,7 @@ void TestGLibLoopInternal(EventInjector* injector) {
ASSERT_EQ(3, task_count);
EXPECT_EQ(4, injector->processed_events());
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void TestGtkLoopInternal(EventInjector* injector) {
@@ -549,7 +549,7 @@ void TestGtkLoopInternal(EventInjector* injector) {
ASSERT_EQ(3, task_count);
EXPECT_EQ(4, injector->processed_events());
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
} // namespace
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/synchronization/waitable_event_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698