| 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(); | |
| 177 component_updater_.reset(); | 176 component_updater_.reset(); |
| 178 } | 177 } |
| 179 | 178 |
| 180 void ComponentUpdaterTest::SetUp() { | 179 void ComponentUpdaterTest::SetUp() { |
| 181 } | 180 } |
| 182 | 181 |
| 183 void ComponentUpdaterTest::TearDown() { | 182 void ComponentUpdaterTest::TearDown() { |
| 184 } | 183 } |
| 185 | 184 |
| 186 void ComponentUpdaterTest::RunThreads() { | 185 void ComponentUpdaterTest::RunThreads() { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 347 |
| 349 EXPECT_TRUE(component_updater().RegisterComponent(crx_component)); | 348 EXPECT_TRUE(component_updater().RegisterComponent(crx_component)); |
| 350 component_updater().MaybeThrottle( | 349 component_updater().MaybeThrottle( |
| 351 "jebgalgnebhfojomionfpkfelancnnkf", | 350 "jebgalgnebhfojomionfpkfelancnnkf", |
| 352 base::Bind(&ComponentUpdaterTest::ReadyCallback)); | 351 base::Bind(&ComponentUpdaterTest::ReadyCallback)); |
| 353 | 352 |
| 354 RunThreads(); | 353 RunThreads(); |
| 355 } | 354 } |
| 356 | 355 |
| 357 } // namespace component_updater | 356 } // namespace component_updater |
| OLD | NEW |