OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |