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

Unified Diff: base/task_scheduler/task_scheduler_impl_unittest.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase 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/scheduler_worker_unittest.cc ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler_impl_unittest.cc
diff --git a/base/task_scheduler/task_scheduler_impl_unittest.cc b/base/task_scheduler/task_scheduler_impl_unittest.cc
index 1489baebe4f958f5d12477ac2dc9c19e6ed41376..e0f88691bba14bb1abe5b64c767a5b5de844678c 100644
--- a/base/task_scheduler/task_scheduler_impl_unittest.cc
+++ b/base/task_scheduler/task_scheduler_impl_unittest.cc
@@ -242,8 +242,8 @@ TEST_P(TaskSchedulerImplTest, PostDelayedTaskWithTraitsNoDelay) {
WaitableEvent::InitialState::NOT_SIGNALED);
scheduler_->PostDelayedTaskWithTraits(
FROM_HERE, GetParam().traits,
- Bind(&VerifyTaskEnvironmentAndSignalEvent, GetParam().traits,
- Unretained(&task_ran)),
+ BindOnce(&VerifyTaskEnvironmentAndSignalEvent, GetParam().traits,
+ Unretained(&task_ran)),
TimeDelta());
task_ran.Wait();
}
@@ -257,9 +257,9 @@ TEST_P(TaskSchedulerImplTest, PostDelayedTaskWithTraitsWithDelay) {
WaitableEvent::InitialState::NOT_SIGNALED);
scheduler_->PostDelayedTaskWithTraits(
FROM_HERE, GetParam().traits,
- Bind(&VerifyTimeAndTaskEnvironmentAndSignalEvent, GetParam().traits,
- TimeTicks::Now() + TestTimeouts::tiny_timeout(),
- Unretained(&task_ran)),
+ BindOnce(&VerifyTimeAndTaskEnvironmentAndSignalEvent, GetParam().traits,
+ TimeTicks::Now() + TestTimeouts::tiny_timeout(),
+ Unretained(&task_ran)),
TestTimeouts::tiny_timeout());
task_ran.Wait();
}
@@ -338,7 +338,7 @@ TEST_F(TaskSchedulerImplTest, SequencedRunsTasksOnCurrentThread) {
WaitableEvent::InitialState::NOT_SIGNALED);
single_thread_task_runner->PostTask(
FROM_HERE,
- Bind(
+ BindOnce(
[](scoped_refptr<TaskRunner> sequenced_task_runner,
WaitableEvent* task_ran) {
EXPECT_FALSE(sequenced_task_runner->RunsTasksOnCurrentThread());
@@ -360,7 +360,7 @@ TEST_F(TaskSchedulerImplTest, SingleThreadRunsTasksOnCurrentThread) {
WaitableEvent::InitialState::NOT_SIGNALED);
sequenced_task_runner->PostTask(
FROM_HERE,
- Bind(
+ BindOnce(
[](scoped_refptr<TaskRunner> single_thread_task_runner,
WaitableEvent* task_ran) {
EXPECT_FALSE(single_thread_task_runner->RunsTasksOnCurrentThread());
« no previous file with comments | « base/task_scheduler/scheduler_worker_unittest.cc ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698