OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/threading/sequenced_worker_pool.h" | 5 #include "base/threading/sequenced_worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 class SequencedWorkerPoolTest : public testing::Test { | 179 class SequencedWorkerPoolTest : public testing::Test { |
180 public: | 180 public: |
181 SequencedWorkerPoolTest() | 181 SequencedWorkerPoolTest() |
182 : tracker_(new TestTracker) { | 182 : tracker_(new TestTracker) { |
183 ResetPool(); | 183 ResetPool(); |
184 } | 184 } |
185 | 185 |
186 virtual ~SequencedWorkerPoolTest() {} | 186 virtual ~SequencedWorkerPoolTest() {} |
187 | 187 |
188 virtual void SetUp() OVERRIDE {} | 188 virtual void SetUp() override {} |
189 | 189 |
190 virtual void TearDown() OVERRIDE { | 190 virtual void TearDown() override { |
191 pool()->Shutdown(); | 191 pool()->Shutdown(); |
192 } | 192 } |
193 | 193 |
194 const scoped_refptr<SequencedWorkerPool>& pool() { | 194 const scoped_refptr<SequencedWorkerPool>& pool() { |
195 return pool_owner_->pool(); | 195 return pool_owner_->pool(); |
196 } | 196 } |
197 TestTracker* tracker() { return tracker_.get(); } | 197 TestTracker* tracker() { return tracker_.get(); } |
198 | 198 |
199 // Destroys the SequencedWorkerPool instance, blocking until it is fully shut | 199 // Destroys the SequencedWorkerPool instance, blocking until it is fully shut |
200 // down, and creates a new instance. | 200 // down, and creates a new instance. |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 SequencedWorkerPoolSequencedTaskRunner, TaskRunnerTest, | 915 SequencedWorkerPoolSequencedTaskRunner, TaskRunnerTest, |
916 SequencedWorkerPoolSequencedTaskRunnerTestDelegate); | 916 SequencedWorkerPoolSequencedTaskRunnerTestDelegate); |
917 | 917 |
918 INSTANTIATE_TYPED_TEST_CASE_P( | 918 INSTANTIATE_TYPED_TEST_CASE_P( |
919 SequencedWorkerPoolSequencedTaskRunner, SequencedTaskRunnerTest, | 919 SequencedWorkerPoolSequencedTaskRunner, SequencedTaskRunnerTest, |
920 SequencedWorkerPoolSequencedTaskRunnerTestDelegate); | 920 SequencedWorkerPoolSequencedTaskRunnerTestDelegate); |
921 | 921 |
922 } // namespace | 922 } // namespace |
923 | 923 |
924 } // namespace base | 924 } // namespace base |
OLD | NEW |