Chromium Code Reviews| 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()); |