| Index: chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
|
| diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
|
| index 7706b409eefbf67e218235aab97c5d12debd26df..d06758a0c3616a6a277f4d0aa348b38d99932255 100644
|
| --- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
|
| +++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
|
| @@ -109,8 +109,8 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
|
| WillOnce(Return(true));
|
| EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
|
| WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
|
| - EXPECT_CALL(*model_associator_, AssociateModels(_)).
|
| - WillOnce(Return(true));
|
| + EXPECT_CALL(*model_associator_, AssociateModels()).
|
| + WillOnce(Return(SyncError()));
|
| EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
|
| }
|
|
|
| @@ -122,7 +122,8 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
|
| void SetStopExpectations() {
|
| EXPECT_CALL(*dtc_mock_, CleanUpState());
|
| EXPECT_CALL(service_, DeactivateDataType(_));
|
| - EXPECT_CALL(*model_associator_, DisassociateModels(_));
|
| + EXPECT_CALL(*model_associator_, DisassociateModels()).
|
| + WillOnce(Return(SyncError()));
|
| }
|
|
|
| void SetStartFailExpectations(DataTypeController::StartResult result) {
|
| @@ -165,8 +166,8 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartFirstRun) {
|
| WillOnce(Return(true));
|
| EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
|
| WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
|
| - EXPECT_CALL(*model_associator_, AssociateModels(_)).
|
| - WillOnce(Return(true));
|
| + EXPECT_CALL(*model_associator_, AssociateModels()).
|
| + WillOnce(Return(SyncError()));
|
| EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
|
| SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
|
| EXPECT_EQ(DataTypeController::NOT_RUNNING, frontend_dtc_->state());
|
| @@ -192,9 +193,11 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartAssociationFailed) {
|
| WillOnce(Return(true));
|
| EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
|
| WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
|
| - EXPECT_CALL(*model_associator_, AssociateModels(_)).
|
| - WillOnce(DoAll(browser_sync::SetSyncError(syncable::PREFERENCES),
|
| - Return(false)));
|
| + EXPECT_CALL(*model_associator_, AssociateModels()).
|
| + WillOnce(Return(SyncError(FROM_HERE,
|
| + "error",
|
| + syncable::PREFERENCES)));
|
| +
|
| EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
|
| SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
|
| // Set up association to fail with an association failed error.
|
|
|