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

Unified Diff: components/sync_driver/device_info_service_unittest.cc

Issue 2077713002: [USS] Store supports hosting multiple datatypes per database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: can create multiple backend base on path Created 4 years, 6 months 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 | « no previous file | sync/api/model_type_store.h » ('j') | sync/api/model_type_store.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/device_info_service_unittest.cc
diff --git a/components/sync_driver/device_info_service_unittest.cc b/components/sync_driver/device_info_service_unittest.cc
index b9b0b9e5a5f5a186109bbe5d434039e699eaf72a..5f387a2864504ff7ca0325cbc72f2aacb270fdb0 100644
--- a/components/sync_driver/device_info_service_unittest.cc
+++ b/components/sync_driver/device_info_service_unittest.cc
@@ -169,7 +169,6 @@ class DeviceInfoServiceTest : public testing::Test,
protected:
DeviceInfoServiceTest()
: change_count_(0),
- store_(ModelTypeStoreTestUtil::CreateInMemoryStoreForTest()),
local_device_(new LocalDeviceInfoProviderMock()) {
local_device_->Initialize(CreateDeviceInfo());
}
@@ -183,6 +182,17 @@ class DeviceInfoServiceTest : public testing::Test,
base::RunLoop().RunUntilIdle();
}
+ void SetUp() override {
maxbogue 2016/06/23 18:22:22 I believe this should just be in the body of the c
Gang Wu 2016/06/27 23:19:39 Done.
+ store_ = ModelTypeStoreTestUtil::CreateInMemoryStoreForTest();
+ base::RunLoop().RunUntilIdle();
+ }
+
+ void TearDown() override {
+ std::swap(store_, service_->store_);
+ store_.reset();
+ base::RunLoop().RunUntilIdle();
+ }
+
void OnDeviceInfoChange() override { change_count_++; }
std::unique_ptr<ModelTypeChangeProcessor> CreateModelTypeChangeProcessor(
@@ -734,6 +744,7 @@ TEST_F(DeviceInfoServiceTest, MergeLocalGuid) {
}
TEST_F(DeviceInfoServiceTest, GetLastUpdateTime) {
+ InitializeAndPump();
Time time1(Time() + TimeDelta::FromDays(1));
DeviceInfoSpecifics specifics1(GenerateTestSpecifics());
« no previous file with comments | « no previous file | sync/api/model_type_store.h » ('j') | sync/api/model_type_store.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698