Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: components/component_updater/component_updater_service_unittest.cc

Issue 1417353006: Tests: Simplify SequencedWorkerPoolOwner, call Shutdown on destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjust formatting and rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/test_autofill_driver.cc ('k') | components/rlz/rlz_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698