OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 true)); | 243 true)); |
244 EXPECT_CALL(*factory, CreateDataTypeManager(_, _, _, _)).Times(0); | 244 EXPECT_CALL(*factory, CreateDataTypeManager(_, _, _, _)).Times(0); |
245 EXPECT_CALL(*factory, CreateBookmarkSyncComponents(_, _)). | 245 EXPECT_CALL(*factory, CreateBookmarkSyncComponents(_, _)). |
246 Times(0); | 246 Times(0); |
247 harness_.service->RegisterDataTypeController( | 247 harness_.service->RegisterDataTypeController( |
248 new BookmarkDataTypeController(harness_.service->factory(), | 248 new BookmarkDataTypeController(harness_.service->factory(), |
249 harness_.profile.get(), | 249 harness_.profile.get(), |
250 harness_.service.get())); | 250 harness_.service.get())); |
251 | 251 |
252 harness_.service->Initialize(); | 252 harness_.service->Initialize(); |
| 253 harness_.service->Shutdown(); |
253 harness_.service.reset(); | 254 harness_.service.reset(); |
254 } | 255 } |
255 | 256 |
256 TEST_F(ProfileSyncServiceTest, DisableAndEnableSyncTemporarily) { | 257 TEST_F(ProfileSyncServiceTest, DisableAndEnableSyncTemporarily) { |
257 SigninManager* signin = | 258 SigninManager* signin = |
258 SigninManagerFactory::GetForProfile(harness_.profile.get()); | 259 SigninManagerFactory::GetForProfile(harness_.profile.get()); |
259 signin->SetAuthenticatedUsername("test"); | 260 signin->SetAuthenticatedUsername("test"); |
260 ProfileSyncComponentsFactoryMock* factory = | 261 ProfileSyncComponentsFactoryMock* factory = |
261 new ProfileSyncComponentsFactoryMock(); | 262 new ProfileSyncComponentsFactoryMock(); |
262 harness_.service.reset(new TestProfileSyncService( | 263 harness_.service.reset(new TestProfileSyncService( |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 namespace syncer { | 610 namespace syncer { |
610 namespace { | 611 namespace { |
611 | 612 |
612 // ProfileSyncService should behave just like an invalidator. | 613 // ProfileSyncService should behave just like an invalidator. |
613 INSTANTIATE_TYPED_TEST_CASE_P( | 614 INSTANTIATE_TYPED_TEST_CASE_P( |
614 ProfileSyncServiceInvalidatorTest, InvalidatorTest, | 615 ProfileSyncServiceInvalidatorTest, InvalidatorTest, |
615 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate); | 616 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate); |
616 | 617 |
617 } // namespace | 618 } // namespace |
618 } // namespace syncer | 619 } // namespace syncer |
OLD | NEW |