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

Side by Side Diff: chrome/browser/sync/profile_sync_service_preference_unittest.cc

Issue 247433004: sync: remove CreateSharedChangeProcessor from ProfileSyncComponentsFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove SCPFactory Created 6 years, 8 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
OLDNEW
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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 EXPECT_CALL(*components, CreateDataTypeManager(_, _, _, _, _, _)). 198 EXPECT_CALL(*components, CreateDataTypeManager(_, _, _, _, _, _)).
199 WillOnce(ReturnNewDataTypeManagerWithDebugListener( 199 WillOnce(ReturnNewDataTypeManagerWithDebugListener(
200 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr()))); 200 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr())));
201 dtc_ = new UIDataTypeController(base::MessageLoopProxy::current(), 201 dtc_ = new UIDataTypeController(base::MessageLoopProxy::current(),
202 base::Closure(), 202 base::Closure(),
203 syncer::PREFERENCES, 203 syncer::PREFERENCES,
204 components, 204 components,
205 profile_, 205 profile_,
206 sync_service_); 206 sync_service_);
207 EXPECT_CALL(*components, CreateSharedChangeProcessor()).
208 WillOnce(Return(new SharedChangeProcessor()));
209 EXPECT_CALL(*components, CreateGenericChangeProcessor(_, _, _, _)). 207 EXPECT_CALL(*components, CreateGenericChangeProcessor(_, _, _, _)).
210 WillOnce(CreateAndSaveChangeProcessor( 208 WillOnce(CreateAndSaveChangeProcessor(
211 &change_processor_)); 209 &change_processor_));
212 sync_service_->RegisterDataTypeController(dtc_); 210 sync_service_->RegisterDataTypeController(dtc_);
213 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) 211 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
214 ->UpdateCredentials("test", "oauth2_login_token"); 212 ->UpdateCredentials("test", "oauth2_login_token");
215 213
216 sync_service_->Initialize(); 214 sync_service_->Initialize();
217 base::MessageLoop::current()->Run(); 215 base::MessageLoop::current()->Run();
218 216
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 EXPECT_FALSE(pref->IsDefaultValue()); 905 EXPECT_FALSE(pref->IsDefaultValue());
908 // There should be no synced value. 906 // There should be no synced value.
909 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 907 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
910 // Switch kHomePage back to unmanaged. 908 // Switch kHomePage back to unmanaged.
911 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 909 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
912 // The original value should be picked up. 910 // The original value should be picked up.
913 EXPECT_TRUE(pref->IsDefaultValue()); 911 EXPECT_TRUE(pref->IsDefaultValue());
914 // There should still be no synced value. 912 // There should still be no synced value.
915 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 913 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
916 } 914 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698