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 <limits> | 5 #include <limits> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 pool->GetSequencedTaskRunner(pool->GetSequenceToken()), | 166 pool->GetSequencedTaskRunner(pool->GetSequenceToken()), |
167 message_loop_.task_runner()); | 167 message_loop_.task_runner()); |
168 | 168 |
169 update_client_ = new MockUpdateClient(); | 169 update_client_ = new MockUpdateClient(); |
170 EXPECT_CALL(update_client(), AddObserver(_)).Times(1); | 170 EXPECT_CALL(update_client(), AddObserver(_)).Times(1); |
171 component_updater_.reset(new CrxUpdateService(config_, update_client_)); | 171 component_updater_.reset(new CrxUpdateService(config_, update_client_)); |
172 } | 172 } |
173 | 173 |
174 ComponentUpdaterTest::~ComponentUpdaterTest() { | 174 ComponentUpdaterTest::~ComponentUpdaterTest() { |
175 EXPECT_CALL(update_client(), RemoveObserver(_)).Times(1); | 175 EXPECT_CALL(update_client(), RemoveObserver(_)).Times(1); |
| 176 worker_pool_->pool()->Shutdown(); |
176 component_updater_.reset(); | 177 component_updater_.reset(); |
177 } | 178 } |
178 | 179 |
179 void ComponentUpdaterTest::SetUp() { | 180 void ComponentUpdaterTest::SetUp() { |
180 } | 181 } |
181 | 182 |
182 void ComponentUpdaterTest::TearDown() { | 183 void ComponentUpdaterTest::TearDown() { |
183 } | 184 } |
184 | 185 |
185 void ComponentUpdaterTest::RunThreads() { | 186 void ComponentUpdaterTest::RunThreads() { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 348 |
348 EXPECT_TRUE(component_updater().RegisterComponent(crx_component)); | 349 EXPECT_TRUE(component_updater().RegisterComponent(crx_component)); |
349 component_updater().MaybeThrottle( | 350 component_updater().MaybeThrottle( |
350 "jebgalgnebhfojomionfpkfelancnnkf", | 351 "jebgalgnebhfojomionfpkfelancnnkf", |
351 base::Bind(&ComponentUpdaterTest::ReadyCallback)); | 352 base::Bind(&ComponentUpdaterTest::ReadyCallback)); |
352 | 353 |
353 RunThreads(); | 354 RunThreads(); |
354 } | 355 } |
355 | 356 |
356 } // namespace component_updater | 357 } // namespace component_updater |
OLD | NEW |