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

Unified Diff: base/message_pump_glib_unittest.cc

Issue 9114020: Remove task.h and finish base::Bind() migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 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/observer_list_threadsafe.h » ('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 467088c06b2451e7fa338842c31c83aa08a4390b..c70935585427df7943459e31b21b037af4dec682 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()) {
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698