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

Unified Diff: ui/app_list/search/history_data_store_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_simple_job_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search/history_data_store_unittest.cc
diff --git a/ui/app_list/search/history_data_store_unittest.cc b/ui/app_list/search/history_data_store_unittest.cc
index 26890f46619f1eb7c2c81968b10dfc2247bcb523..6af4dc02b7ac8bd3c13b349e2d8936afc4b675c3 100644
--- a/ui/app_list/search/history_data_store_unittest.cc
+++ b/ui/app_list/search/history_data_store_unittest.cc
@@ -9,7 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
-#include "base/threading/sequenced_worker_pool.h"
+#include "base/test/sequenced_worker_pool_owner.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/app_list/search/dictionary_data_store.h"
#include "ui/app_list/search/history_data.h"
@@ -41,12 +41,10 @@ std::string GetDataContent(const HistoryData::Data& data) {
class HistoryDataStoreTest : public testing::Test {
public:
- HistoryDataStoreTest() {}
- ~HistoryDataStoreTest() override {}
+ HistoryDataStoreTest() : worker_pool_owner_(1, "AppLanucherTest") {}
// testing::Test overrides:
void SetUp() override {
- worker_pool_ = new base::SequencedWorkerPool(1, "AppLauncherTest");
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}
void TearDown() override {
@@ -57,7 +55,7 @@ class HistoryDataStoreTest : public testing::Test {
void OpenStore(const std::string& file_name) {
data_file_ = temp_dir_.path().AppendASCII(file_name);
store_ = new HistoryDataStore(scoped_refptr<DictionaryDataStore>(
- new DictionaryDataStore(data_file_, worker_pool_.get())));
+ new DictionaryDataStore(data_file_, worker_pool_owner_.pool().get())));
Load();
}
@@ -95,7 +93,7 @@ class HistoryDataStoreTest : public testing::Test {
base::ScopedTempDir temp_dir_;
base::FilePath data_file_;
scoped_ptr<base::RunLoop> run_loop_;
- scoped_refptr<base::SequencedWorkerPool> worker_pool_;
+ base::SequencedWorkerPoolOwner worker_pool_owner_;
scoped_refptr<HistoryDataStore> store_;
HistoryData::Associations associations_;
« no previous file with comments | « net/url_request/url_request_simple_job_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698