diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 22:12:28 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 22:12:28 +0000 |
commit | c694427c13725a8d73303fbe2c47e8cbd6abd6c3 (patch) | |
tree | ed40f286e831e116b5718f37e454d8dace85abfb /base/message_pump_glib_unittest.cc | |
parent | 0b8545bf5feeb7e5340eeff11279402c2d06a778 (diff) | |
download | chromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.zip chromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.tar.gz chromium_src-c694427c13725a8d73303fbe2c47e8cbd6abd6c3.tar.bz2 |
Remove task.h and finish base::Bind() migration.
Over 341 CLs, in ~3 months, touching 3251 unique files!
Top 5 most CLs:
(121) jhawkins
( 45) dcheng
( 24) achuith
( 23) csilv
( 12) tfarina
( 12) groby
~1000 files touched:
(918) jhawkins
100+ files touched:
(486) ajwong
(385) willchan
(372) dcheng
(126) csilv
(123) fischman
(112) sergeyu
49+ files touched:
(65) tfarina
(57) acolwell
(52) adamk
(49) tzik
BUG=35223
TEST=existing
Review URL: http://codereview.chromium.org/9114020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_glib_unittest.cc')
-rw-r--r-- | base/message_pump_glib_unittest.cc | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/base/message_pump_glib_unittest.cc b/base/message_pump_glib_unittest.cc index 467088c..c709355 100644 --- a/base/message_pump_glib_unittest.cc +++ b/base/message_pump_glib_unittest.cc @@ -141,10 +141,6 @@ GSourceFuncs EventInjector::SourceFuncs = { NULL }; -// Does nothing. This function can be called from a task. -void DoNothing() { -} - void IncrementInt(int *value) { ++*value; } @@ -211,24 +207,24 @@ TEST_F(MessagePumpGLibTest, TestEventTaskInterleave) { // If changes cause this test to fail, it is reasonable to change it, but // TestWorkWhileWaitingForEvents and TestEventsWhileWaitingForWork have to be // changed accordingly, otherwise they can become flaky. - injector()->AddEventAsTask(0, base::Bind(&DoNothing)); + injector()->AddEventAsTask(0, base::Bind(&base::DoNothing)); base::Closure check_task = base::Bind(&ExpectProcessedEvents, base::Unretained(injector()), 2); base::Closure posted_task = base::Bind(&PostMessageLoopTask, FROM_HERE, check_task); injector()->AddEventAsTask(0, posted_task); - injector()->AddEventAsTask(0, base::Bind(&DoNothing)); + injector()->AddEventAsTask(0, base::Bind(&base::DoNothing)); injector()->AddEvent(0, MessageLoop::QuitClosure()); loop()->Run(); EXPECT_EQ(4, injector()->processed_events()); injector()->Reset(); - injector()->AddEventAsTask(0, base::Bind(&DoNothing)); + injector()->AddEventAsTask(0, base::Bind(&base::DoNothing)); check_task = base::Bind(&ExpectProcessedEvents, base::Unretained(injector()), 2); posted_task = base::Bind(&PostMessageLoopTask, FROM_HERE, check_task); injector()->AddEventAsTask(0, posted_task); - injector()->AddEventAsTask(10, base::Bind(&DoNothing)); + injector()->AddEventAsTask(10, base::Bind(&base::DoNothing)); injector()->AddEvent(0, MessageLoop::QuitClosure()); loop()->Run(); EXPECT_EQ(4, injector()->processed_events()); @@ -384,8 +380,8 @@ void AddEventsAndDrainGLib(EventInjector* injector) { injector->AddEvent(0, MessageLoop::QuitClosure()); // Post a couple of dummy tasks - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DoNothing)); - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DoNothing)); + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing)); + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing)); // Drain the events while (g_main_context_pending(NULL)) { @@ -417,8 +413,8 @@ void AddEventsAndDrainGtk(EventInjector* injector) { injector->AddEvent(0, MessageLoop::QuitClosure()); // Post a couple of dummy tasks - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DoNothing)); - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DoNothing)); + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing)); + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing)); // Drain the events while (gtk_events_pending()) { |