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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl_unittest.cc

Issue 2710853002: Synchronize Test Code Based off of Comments from https://codereview.chromium.org/2698843006/ (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
diff --git a/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc b/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
index dfaa9c7ff3d3a8071aceda80584d98eb447622d9..ac058277efb1c08fe5a8a97570fa6428b2c384e3 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
+++ b/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
@@ -181,7 +181,7 @@ class ThreadPostingTasks : public SimpleThread {
using WaitBeforePostTask = ThreadPostingTasks::WaitBeforePostTask;
-void ShouldNotRunCallback() {
+void ShouldNotRun() {
ADD_FAILURE() << "Ran a task that shouldn't run.";
}
@@ -316,7 +316,7 @@ TEST_P(TaskSchedulerWorkerPoolImplTest, PostTaskAfterShutdown) {
auto task_runner =
CreateTaskRunnerWithExecutionMode(worker_pool_.get(), GetParam());
task_tracker_.Shutdown();
- EXPECT_FALSE(task_runner->PostTask(FROM_HERE, Bind(&ShouldNotRunCallback)));
+ EXPECT_FALSE(task_runner->PostTask(FROM_HERE, Bind(&ShouldNotRun)));
}
// Verify that a Task runs shortly after its delay expires.
@@ -348,10 +348,10 @@ TEST_P(TaskSchedulerWorkerPoolImplTest, PostDelayedTask) {
// returns true when appropriate so this method complements it to get full
// coverage of that method.
TEST_P(TaskSchedulerWorkerPoolImplTest, SequencedRunsTasksOnCurrentThread) {
- scoped_refptr<TaskRunner> task_runner(
- CreateTaskRunnerWithExecutionMode(worker_pool_.get(), GetParam()));
- scoped_refptr<SequencedTaskRunner> sequenced_task_runner(
- worker_pool_->CreateSequencedTaskRunnerWithTraits(TaskTraits()));
+ auto task_runner =
+ CreateTaskRunnerWithExecutionMode(worker_pool_.get(), GetParam());
+ auto sequenced_task_runner =
+ worker_pool_->CreateSequencedTaskRunnerWithTraits(TaskTraits());
WaitableEvent task_ran(WaitableEvent::ResetPolicy::MANUAL,
WaitableEvent::InitialState::NOT_SIGNALED);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698