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

Unified Diff: chrome/browser/sync/glue/preference_data_type_controller_unittest.cc

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix final unit test <3 c++ Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
index ba436d9680c8359dfa6170ce66cd803c1fb6a1a8..3bca18bfb5308235fe3581cbf203a1262e6214ea 100644
--- a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
@@ -61,7 +61,7 @@ class PreferenceDataTypeControllerTest : public testing::Test {
WillRepeatedly(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels()).
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
WillRepeatedly(Return(true));
}
@@ -71,7 +71,7 @@ class PreferenceDataTypeControllerTest : public testing::Test {
void SetStopExpectations() {
EXPECT_CALL(service_, DeactivateDataType(_, _));
- EXPECT_CALL(*model_associator_, DisassociateModels());
+ EXPECT_CALL(*model_associator_, DisassociateModels(_));
}
MessageLoopForUI message_loop_;
@@ -119,8 +119,9 @@ TEST_F(PreferenceDataTypeControllerTest, StartOk) {
TEST_F(PreferenceDataTypeControllerTest, StartAssociationFailed) {
SetStartExpectations();
SetAssociateExpectations();
- EXPECT_CALL(*model_associator_, AssociateModels()).
- WillRepeatedly(Return(false));
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
+ WillRepeatedly(DoAll(browser_sync::SetSyncError(syncable::PREFERENCES),
+ Return(false)));
EXPECT_CALL(start_callback_, Run(DataTypeController::ASSOCIATION_FAILED, _));
preference_dtc_->Start(NewCallback(&start_callback_, &StartCallback::Run));
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.cc ('k') | chrome/browser/sync/glue/session_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698