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

Unified Diff: base/task_scheduler/task_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/task_tracker_unittest.cc ('k') | base/task_scheduler/test_task_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_unittest.cc
diff --git a/base/task_scheduler/task_unittest.cc b/base/task_scheduler/task_unittest.cc
index e6a2c518a0a5e4e5c409a261949a9bd104cb9cd6..fb076d761bea261f68d378bc428aa373c7290bc8 100644
--- a/base/task_scheduler/task_unittest.cc
+++ b/base/task_scheduler/task_unittest.cc
@@ -17,7 +17,7 @@ namespace internal {
// adjusted to SKIP_ON_SHUTDOWN. The shutown behavior of other delayed tasks
// should not change.
TEST(TaskSchedulerTaskTest, ShutdownBehaviorChangeWithDelay) {
- Task continue_on_shutdown(FROM_HERE, Bind(&DoNothing),
+ Task continue_on_shutdown(FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(
TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
TimeDelta::FromSeconds(1));
@@ -25,14 +25,14 @@ TEST(TaskSchedulerTaskTest, ShutdownBehaviorChangeWithDelay) {
continue_on_shutdown.traits.shutdown_behavior());
Task skip_on_shutdown(
- FROM_HERE, Bind(&DoNothing),
+ FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN),
TimeDelta::FromSeconds(1));
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN,
skip_on_shutdown.traits.shutdown_behavior());
Task block_shutdown(
- FROM_HERE, Bind(&DoNothing),
+ FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::BLOCK_SHUTDOWN),
TimeDelta::FromSeconds(1));
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN,
@@ -41,7 +41,7 @@ TEST(TaskSchedulerTaskTest, ShutdownBehaviorChangeWithDelay) {
// Verify that the shutdown behavior of undelayed tasks is not adjusted.
TEST(TaskSchedulerTaskTest, NoShutdownBehaviorChangeNoDelay) {
- Task continue_on_shutdown(FROM_HERE, Bind(&DoNothing),
+ Task continue_on_shutdown(FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(
TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
TimeDelta());
@@ -49,14 +49,14 @@ TEST(TaskSchedulerTaskTest, NoShutdownBehaviorChangeNoDelay) {
continue_on_shutdown.traits.shutdown_behavior());
Task skip_on_shutdown(
- FROM_HERE, Bind(&DoNothing),
+ FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN),
TimeDelta());
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN,
skip_on_shutdown.traits.shutdown_behavior());
Task block_shutdown(
- FROM_HERE, Bind(&DoNothing),
+ FROM_HERE, BindOnce(&DoNothing),
TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::BLOCK_SHUTDOWN),
TimeDelta());
EXPECT_EQ(TaskShutdownBehavior::BLOCK_SHUTDOWN,
« no previous file with comments | « base/task_scheduler/task_tracker_unittest.cc ('k') | base/task_scheduler/test_task_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698