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

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 437683002: Wire sync shutdown reason from PSS all the way down to sync manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/sync_rollback_manager_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Unit tests for the SyncApi. Note that a lot of the underlying 5 // Unit tests for the SyncApi. Note that a lot of the underlying
6 // functionality is provided by the Syncable layer, which has its own 6 // functionality is provided by the Syncable layer, which has its own
7 // unit tests. We'll test SyncApi specific things in this harness. 7 // unit tests. We'll test SyncApi specific things in this harness.
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 type_roots_[i->first] = MakeServerNodeForType( 846 type_roots_[i->first] = MakeServerNodeForType(
847 sync_manager_.GetUserShare(), i->first); 847 sync_manager_.GetUserShare(), i->first);
848 } 848 }
849 } 849 }
850 850
851 PumpLoop(); 851 PumpLoop();
852 } 852 }
853 853
854 void TearDown() { 854 void TearDown() {
855 sync_manager_.RemoveObserver(&manager_observer_); 855 sync_manager_.RemoveObserver(&manager_observer_);
856 sync_manager_.ShutdownOnSyncThread(); 856 sync_manager_.ShutdownOnSyncThread(STOP_SYNC);
857 PumpLoop(); 857 PumpLoop();
858 } 858 }
859 859
860 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { 860 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) {
861 (*out)[NIGORI] = GROUP_PASSIVE; 861 (*out)[NIGORI] = GROUP_PASSIVE;
862 (*out)[DEVICE_INFO] = GROUP_PASSIVE; 862 (*out)[DEVICE_INFO] = GROUP_PASSIVE;
863 (*out)[EXPERIMENTS] = GROUP_PASSIVE; 863 (*out)[EXPERIMENTS] = GROUP_PASSIVE;
864 (*out)[BOOKMARKS] = GROUP_PASSIVE; 864 (*out)[BOOKMARKS] = GROUP_PASSIVE;
865 (*out)[THEMES] = GROUP_PASSIVE; 865 (*out)[THEMES] = GROUP_PASSIVE;
866 (*out)[SESSIONS] = GROUP_PASSIVE; 866 (*out)[SESSIONS] = GROUP_PASSIVE;
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 // SyncManagerInitInvalidStorageTest::GetFactory will return 3189 // SyncManagerInitInvalidStorageTest::GetFactory will return
3190 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3190 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3191 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3191 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3192 // task is to ensure that SyncManagerImpl reported initialization failure in 3192 // task is to ensure that SyncManagerImpl reported initialization failure in
3193 // OnInitializationComplete callback. 3193 // OnInitializationComplete callback.
3194 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3194 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3195 EXPECT_FALSE(initialization_succeeded_); 3195 EXPECT_FALSE(initialization_succeeded_);
3196 } 3196 }
3197 3197
3198 } // namespace syncer 3198 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/sync_rollback_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698