| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/categorized_worker_pool.h" |
| 6 #include "base/sequenced_task_runner.h" |
| 5 #include "base/test/sequenced_task_runner_test_template.h" | 7 #include "base/test/sequenced_task_runner_test_template.h" |
| 6 #include "base/test/task_runner_test_template.h" | 8 #include "base/test/task_runner_test_template.h" |
| 7 #include "base/threading/simple_thread.h" | 9 #include "base/threading/simple_thread.h" |
| 8 #include "cc/test/task_graph_runner_test_template.h" | 10 #include "cc/test/task_graph_runner_test_template.h" |
| 9 #include "content/renderer/categorized_worker_pool.h" | |
| 10 | 11 |
| 11 namespace base { | 12 namespace base { |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 // Number of threads spawned in tests. | 15 // Number of threads spawned in tests. |
| 15 const int kNumThreads = 4; | 16 const int kNumThreads = 4; |
| 16 | 17 |
| 17 class CategorizedWorkerPoolTestDelegate { | 18 class CategorizedWorkerPoolTestDelegate { |
| 18 public: | 19 public: |
| 19 CategorizedWorkerPoolTestDelegate() | 20 CategorizedWorkerPoolTestDelegate() |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 CategorizedWorkerPoolTaskGraphRunnerTestDelegate<5>); | 114 CategorizedWorkerPoolTaskGraphRunnerTestDelegate<5>); |
| 114 | 115 |
| 115 // Single threaded tests. | 116 // Single threaded tests. |
| 116 INSTANTIATE_TYPED_TEST_CASE_P( | 117 INSTANTIATE_TYPED_TEST_CASE_P( |
| 117 CategorizedWorkerPool, | 118 CategorizedWorkerPool, |
| 118 SingleThreadTaskGraphRunnerTest, | 119 SingleThreadTaskGraphRunnerTest, |
| 119 CategorizedWorkerPoolTaskGraphRunnerTestDelegate<1>); | 120 CategorizedWorkerPoolTaskGraphRunnerTestDelegate<1>); |
| 120 | 121 |
| 121 } // namespace | 122 } // namespace |
| 122 } // namespace cc | 123 } // namespace cc |
| OLD | NEW |