Index: base/task_scheduler/task_unittest.cc |
diff --git a/base/task_scheduler/task_unittest.cc b/base/task_scheduler/task_unittest.cc |
index fb076d761bea261f68d378bc428aa373c7290bc8..0da27000c07a5eef4d98ca2a1c9c5ab3722a06db 100644 |
--- a/base/task_scheduler/task_unittest.cc |
+++ b/base/task_scheduler/task_unittest.cc |
@@ -18,23 +18,20 @@ namespace internal { |
// should not change. |
TEST(TaskSchedulerTaskTest, ShutdownBehaviorChangeWithDelay) { |
Task continue_on_shutdown(FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior( |
- TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), |
+ {TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, |
TimeDelta::FromSeconds(1)); |
EXPECT_EQ(TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN, |
continue_on_shutdown.traits.shutdown_behavior()); |
- Task skip_on_shutdown( |
- FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN), |
- TimeDelta::FromSeconds(1)); |
+ Task skip_on_shutdown(FROM_HERE, BindOnce(&DoNothing), |
+ {TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, |
+ TimeDelta::FromSeconds(1)); |
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN, |
skip_on_shutdown.traits.shutdown_behavior()); |
- Task block_shutdown( |
- FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::BLOCK_SHUTDOWN), |
- TimeDelta::FromSeconds(1)); |
+ Task block_shutdown(FROM_HERE, BindOnce(&DoNothing), |
+ {TaskShutdownBehavior::BLOCK_SHUTDOWN}, |
+ TimeDelta::FromSeconds(1)); |
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN, |
block_shutdown.traits.shutdown_behavior()); |
} |
@@ -42,23 +39,18 @@ TEST(TaskSchedulerTaskTest, ShutdownBehaviorChangeWithDelay) { |
// Verify that the shutdown behavior of undelayed tasks is not adjusted. |
TEST(TaskSchedulerTaskTest, NoShutdownBehaviorChangeNoDelay) { |
Task continue_on_shutdown(FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior( |
- TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), |
+ {TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, |
TimeDelta()); |
EXPECT_EQ(TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN, |
continue_on_shutdown.traits.shutdown_behavior()); |
- Task skip_on_shutdown( |
- FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN), |
- TimeDelta()); |
+ Task skip_on_shutdown(FROM_HERE, BindOnce(&DoNothing), |
+ {TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, TimeDelta()); |
EXPECT_EQ(TaskShutdownBehavior::SKIP_ON_SHUTDOWN, |
skip_on_shutdown.traits.shutdown_behavior()); |
- Task block_shutdown( |
- FROM_HERE, BindOnce(&DoNothing), |
- TaskTraits().WithShutdownBehavior(TaskShutdownBehavior::BLOCK_SHUTDOWN), |
- TimeDelta()); |
+ Task block_shutdown(FROM_HERE, BindOnce(&DoNothing), |
+ {TaskShutdownBehavior::BLOCK_SHUTDOWN}, TimeDelta()); |
EXPECT_EQ(TaskShutdownBehavior::BLOCK_SHUTDOWN, |
block_shutdown.traits.shutdown_behavior()); |
} |