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

Unified Diff: base/task_scheduler/priority_queue_unittest.cc

Issue 2785943004: DCHECK tasks posted by TaskRunner::PostTask (Closed)
Patch Set: fix Created 3 years, 8 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/task_scheduler/delayed_task_manager.cc ('k') | base/task_scheduler/scheduler_worker_pool_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/priority_queue_unittest.cc
diff --git a/base/task_scheduler/priority_queue_unittest.cc b/base/task_scheduler/priority_queue_unittest.cc
index 221532b60306057cf6a2b64a2d547bfb8c142e55..afaeafb644ed6bee80db97768c0d918cccb3cc5a 100644
--- a/base/task_scheduler/priority_queue_unittest.cc
+++ b/base/task_scheduler/priority_queue_unittest.cc
@@ -6,6 +6,8 @@
#include <memory>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
@@ -59,26 +61,26 @@ TEST(TaskSchedulerPriorityQueueTest, PushPopPeek) {
// Create test sequences.
scoped_refptr<Sequence> sequence_a(new Sequence);
sequence_a->PushTask(MakeUnique<Task>(
- FROM_HERE, Closure(),
+ FROM_HERE, Bind(&DoNothing),
TaskTraits().WithPriority(TaskPriority::USER_VISIBLE), TimeDelta()));
SequenceSortKey sort_key_a = sequence_a->GetSortKey();
scoped_refptr<Sequence> sequence_b(new Sequence);
sequence_b->PushTask(MakeUnique<Task>(
- FROM_HERE, Closure(),
+ FROM_HERE, Bind(&DoNothing),
TaskTraits().WithPriority(TaskPriority::USER_BLOCKING), TimeDelta()));
SequenceSortKey sort_key_b = sequence_b->GetSortKey();
scoped_refptr<Sequence> sequence_c(new Sequence);
sequence_c->PushTask(MakeUnique<Task>(
- FROM_HERE, Closure(),
+ FROM_HERE, Bind(&DoNothing),
TaskTraits().WithPriority(TaskPriority::USER_BLOCKING), TimeDelta()));
SequenceSortKey sort_key_c = sequence_c->GetSortKey();
scoped_refptr<Sequence> sequence_d(new Sequence);
sequence_d->PushTask(MakeUnique<Task>(
- FROM_HERE, Closure(), TaskTraits().WithPriority(TaskPriority::BACKGROUND),
- TimeDelta()));
+ FROM_HERE, Bind(&DoNothing),
+ TaskTraits().WithPriority(TaskPriority::BACKGROUND), TimeDelta()));
SequenceSortKey sort_key_d = sequence_d->GetSortKey();
// Create a PriorityQueue and a Transaction.
« no previous file with comments | « base/task_scheduler/delayed_task_manager.cc ('k') | base/task_scheduler/scheduler_worker_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698