Chromium Code Reviews| Index: base/test/task_runner_test_template.h |
| diff --git a/base/test/task_runner_test_template.h b/base/test/task_runner_test_template.h |
| index df42da6a8d3e855b312cd6b83137416bdb68153f..989a6eef44e79649d3b37b4ca6b3a7c910c7d89a 100644 |
| --- a/base/test/task_runner_test_template.h |
| +++ b/base/test/task_runner_test_template.h |
| @@ -72,7 +72,7 @@ |
| namespace base { |
| -namespace internal { |
| +namespace testing { |
|
gab
2016/03/09 21:53:26
Missing rebase? Thought this change was made upstr
fdoray
2016/03/15 17:28:09
Yes, missing rebase. I will rebase everything afte
|
| // Utility class that keeps track of how many times particular tasks |
| // are run. |
| @@ -105,14 +105,14 @@ class TaskTracker : public RefCountedThreadSafe<TaskTracker> { |
| DISALLOW_COPY_AND_ASSIGN(TaskTracker); |
| }; |
| -} // namespace internal |
| +} // namespace testing |
| template <typename TaskRunnerTestDelegate> |
| -class TaskRunnerTest : public testing::Test { |
| +class TaskRunnerTest : public ::testing::Test { |
| protected: |
| - TaskRunnerTest() : task_tracker_(new internal::TaskTracker()) {} |
| + TaskRunnerTest() : task_tracker_(new testing::TaskTracker()) {} |
| - const scoped_refptr<internal::TaskTracker> task_tracker_; |
| + const scoped_refptr<testing::TaskTracker> task_tracker_; |
| TaskRunnerTestDelegate delegate_; |
| }; |
| @@ -171,7 +171,7 @@ TYPED_TEST_P(TaskRunnerTest, Delayed) { |
| // task runner in order to be conformant. |
| REGISTER_TYPED_TEST_CASE_P(TaskRunnerTest, Basic, Delayed); |
| -namespace internal { |
| +namespace testing { |
| // Calls RunsTasksOnCurrentThread() on |task_runner| and expects it to |
| // equal |expected_value|. |
| @@ -179,7 +179,7 @@ void ExpectRunsTasksOnCurrentThread( |
| bool expected_value, |
| const scoped_refptr<TaskRunner>& task_runner); |
| -} // namespace internal |
| +} // namespace testing |
| template <typename TaskRunnerTestDelegate> |
| class TaskRunnerAffinityTest : public TaskRunnerTest<TaskRunnerTestDelegate> {}; |
| @@ -201,16 +201,10 @@ TYPED_TEST_P(TaskRunnerAffinityTest, RunsTasksOnCurrentThread) { |
| // Post each ith task i+1 times on the task runner and i+1 times on |
| // the non-task-runner thread. |
| for (int i = 0; i < 20; ++i) { |
| - const Closure& ith_task_runner_task = |
| - this->task_tracker_->WrapTask( |
| - Bind(&internal::ExpectRunsTasksOnCurrentThread, |
| - true, task_runner), |
| - i); |
| - const Closure& ith_non_task_runner_task = |
| - this->task_tracker_->WrapTask( |
| - Bind(&internal::ExpectRunsTasksOnCurrentThread, |
| - false, task_runner), |
| - i); |
| + const Closure& ith_task_runner_task = this->task_tracker_->WrapTask( |
| + Bind(&testing::ExpectRunsTasksOnCurrentThread, true, task_runner), i); |
| + const Closure& ith_non_task_runner_task = this->task_tracker_->WrapTask( |
| + Bind(&testing::ExpectRunsTasksOnCurrentThread, false, task_runner), i); |
| for (int j = 0; j < i + 1; ++j) { |
| task_runner->PostTask(FROM_HERE, ith_task_runner_task); |
| thread.task_runner()->PostTask(FROM_HERE, ith_non_task_runner_task); |