src/base/task/thread_pool/job_task_source_unittest.cc
TEST_F(ThreadPoolJobTaskSourceTest, CancelJoinTask) {
  auto job_task = base::MakeRefCounted<test::MockJobTask>(
      DoNothing(), /* num_tasks_to_run */ 2);
  scoped_refptr<JobTaskSource> task_source =
      job_task->GetJobTaskSource(FROM_HERE, {}, &pooled_task_runner_delegate_);

  task_source->Cancel();
  EXPECT_FALSE(task_source->WillJoin());
}
// Verifies that WillJoin() doesn't allow a joining thread to contribute
// after Cancel() is called.
Verifies that WillJoin() doesn't allow a joining thread to contribute
after Cancel() is called.
Verifies that WillJoin () doesn ' t allow a joining thread to contribute after Cancel () is called .
TEST_F(ThreadPoolJobTaskSourceTest, CancelJoinTask) {
  auto job_task = base::MakeRefCounted<test::MockJobTask>(
      DoNothing(),  2);
  scoped_refptr<JobTaskSource> task_source =
      job_task->GetJobTaskSource(FROM_HERE, {}, &pooled_task_runner_delegate_);
  task_source->Cancel();
  EXPECT_FALSE(task_source->WillJoin());
}
TEST_F ( ThreadPoolJobTaskSourceTest , CancelJoinTask ) { auto job_task = base :: MakeRefCounted < test :: MockJobTask > ( DoNothing ( ) , 2 ) ; scoped_refptr < JobTaskSource > task_source = job_task -> GetJobTaskSource ( FROM_HERE , { } , & pooled_task_runner_delegate_ ) ; task_source -> Cancel ( ) ; EXPECT_FALSE ( task_source -> WillJoin ( ) ) ; }
Verifies that WillJoin() doesn't allow a joining thread to contribute
after Cancel() is called.
Verifies that WillJoin () doesn ' t allow a joining thread to contribute after Cancel () is called .
/* num_tasks_to_run */