summaryrefslogtreecommitdiffstats
path: root/base/message_pump_glib_unittest.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 23:07:47 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 23:07:47 +0000
commita5a082fff5011536ba87306bc29202337499523c (patch)
tree844a8f01165fb16c24271e91e9b03552d280401d /base/message_pump_glib_unittest.cc
parent8113f0e67d4826bf11d4f574623aae274c8cde34 (diff)
downloadchromium_src-a5a082fff5011536ba87306bc29202337499523c.zip
chromium_src-a5a082fff5011536ba87306bc29202337499523c.tar.gz
chromium_src-a5a082fff5011536ba87306bc29202337499523c.tar.bz2
Revert 180332 (speculative, BrowserAccessibilityTest.BasicAttributeTest
started failing on mac asan after this landed. I'll revert the revert if it doesn't help.) > base: Update the calls from QuitClosure() to QuitWhenIdleClosure(). > > The former is deprecated and thus should not be used anymore. The later is also > deprecated, but that will be fixed later on. > > BUG=131220 > R=darin@chromium.org > > > Review URL: https://chromiumcodereview.appspot.com/12188008 TBR=tfarina@chromium.org Review URL: https://codereview.chromium.org/12188024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180547 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_glib_unittest.cc')
-rw-r--r--base/message_pump_glib_unittest.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/base/message_pump_glib_unittest.cc b/base/message_pump_glib_unittest.cc
index 9ef3822..4b6b6d4 100644
--- a/base/message_pump_glib_unittest.cc
+++ b/base/message_pump_glib_unittest.cc
@@ -189,12 +189,13 @@ TEST_F(MessagePumpGLibTest, TestQuit) {
// Checks that Quit works and that the basic infrastructure is working.
// Quit from a task
- loop()->RunUntilIdle();
+ loop()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ loop()->Run();
EXPECT_EQ(0, injector()->processed_events());
injector()->Reset();
// Quit from an event
- injector()->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
+ injector()->AddEvent(0, MessageLoop::QuitClosure());
loop()->Run();
EXPECT_EQ(1, injector()->processed_events());
}
@@ -214,7 +215,7 @@ TEST_F(MessagePumpGLibTest, TestEventTaskInterleave) {
base::Bind(&PostMessageLoopTask, FROM_HERE, check_task);
injector()->AddEventAsTask(0, posted_task);
injector()->AddEventAsTask(0, base::Bind(&base::DoNothing));
- injector()->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
+ injector()->AddEvent(0, MessageLoop::QuitClosure());
loop()->Run();
EXPECT_EQ(4, injector()->processed_events());
@@ -225,7 +226,7 @@ TEST_F(MessagePumpGLibTest, TestEventTaskInterleave) {
posted_task = base::Bind(&PostMessageLoopTask, FROM_HERE, check_task);
injector()->AddEventAsTask(0, posted_task);
injector()->AddEventAsTask(10, base::Bind(&base::DoNothing));
- injector()->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
+ injector()->AddEvent(0, MessageLoop::QuitClosure());
loop()->Run();
EXPECT_EQ(4, injector()->processed_events());
}
@@ -242,7 +243,7 @@ TEST_F(MessagePumpGLibTest, TestWorkWhileWaitingForEvents) {
loop()->PostTask(
FROM_HERE,
base::Bind(&EventInjector::AddEvent, base::Unretained(injector()), 0,
- MessageLoop::QuitWhenIdleClosure()));
+ MessageLoop::QuitClosure()));
loop()->Run();
ASSERT_EQ(10, task_count);
EXPECT_EQ(1, injector()->processed_events());
@@ -263,7 +264,7 @@ TEST_F(MessagePumpGLibTest, TestWorkWhileWaitingForEvents) {
loop()->PostDelayedTask(
FROM_HERE,
base::Bind(&EventInjector::AddEvent, base::Unretained(injector()), 10,
- MessageLoop::QuitWhenIdleClosure()),
+ MessageLoop::QuitClosure()),
base::TimeDelta::FromMilliseconds(150));
loop()->Run();
ASSERT_EQ(10, task_count);
@@ -286,7 +287,7 @@ TEST_F(MessagePumpGLibTest, TestEventsWhileWaitingForWork) {
injector()->AddEventAsTask(10, posted_task);
// And then quit (relies on the condition tested by TestEventTaskInterleave).
- injector()->AddEvent(10, MessageLoop::QuitWhenIdleClosure());
+ injector()->AddEvent(10, MessageLoop::QuitClosure());
loop()->Run();
EXPECT_EQ(12, injector()->processed_events());
@@ -380,7 +381,7 @@ void AddEventsAndDrainGLib(EventInjector* injector) {
injector->AddDummyEvent(0);
injector->AddDummyEvent(0);
// Then add an event that will quit the main loop.
- injector->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
+ injector->AddEvent(0, MessageLoop::QuitClosure());
// Post a couple of dummy tasks
MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing));
@@ -413,7 +414,7 @@ void AddEventsAndDrainGtk(EventInjector* injector) {
injector->AddDummyEvent(0);
injector->AddDummyEvent(0);
// Then add an event that will quit the main loop.
- injector->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
+ injector->AddEvent(0, MessageLoop::QuitClosure());
// Post a couple of dummy tasks
MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing));