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

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

Issue 93433006: sync: Introduce ModelTypeRegistry and helpers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split the type manager Created 7 years 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
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 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 for (ModelTypeSet::Iterator iter = protocol_types.First(); iter.Good(); 2909 for (ModelTypeSet::Iterator iter = protocol_types.First(); iter.Good();
2910 iter.Inc()) { 2910 iter.Inc()) {
2911 if (!disabled_types.Has(iter.Get())) { 2911 if (!disabled_types.Has(iter.Get())) {
2912 SetProgressMarkerForType(iter.Get(), true); 2912 SetProgressMarkerForType(iter.Get(), true);
2913 } else { 2913 } else {
2914 SetProgressMarkerForType(iter.Get(), false); 2914 SetProgressMarkerForType(iter.Get(), false);
2915 } 2915 }
2916 } 2916 }
2917 2917
2918 // Set the context to have the old routing info. 2918 // Set the context to have the old routing info.
2919 session_context()->set_routing_info(old_routing_info); 2919 session_context()->SetRoutingInfo(old_routing_info);
2920 2920
2921 CallbackCounter ready_task_counter, retry_task_counter; 2921 CallbackCounter ready_task_counter, retry_task_counter;
2922 sync_manager_.ConfigureSyncer( 2922 sync_manager_.ConfigureSyncer(
2923 reason, 2923 reason,
2924 types_to_download, 2924 types_to_download,
2925 ModelTypeSet(), 2925 ModelTypeSet(),
2926 ModelTypeSet(), 2926 ModelTypeSet(),
2927 ModelTypeSet(), 2927 ModelTypeSet(),
2928 new_routing_info, 2928 new_routing_info,
2929 base::Bind(&CallbackCounter::Callback, 2929 base::Bind(&CallbackCounter::Callback,
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
3511 // SyncManagerInitInvalidStorageTest::GetFactory will return 3511 // SyncManagerInitInvalidStorageTest::GetFactory will return
3512 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3512 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3513 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3513 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3514 // task is to ensure that SyncManagerImpl reported initialization failure in 3514 // task is to ensure that SyncManagerImpl reported initialization failure in
3515 // OnInitializationComplete callback. 3515 // OnInitializationComplete callback.
3516 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3516 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3517 EXPECT_FALSE(initialization_succeeded_); 3517 EXPECT_FALSE(initialization_succeeded_);
3518 } 3518 }
3519 3519
3520 } // namespace 3520 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698