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

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

Issue 7461098: Reland 87645 with clang fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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/non_frontend_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
index eeda4c464f46b876b4ffaef20704abf40779a5d5..e1fc3dda5f205c3e214c149a5a11dc06a7b82f39 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
@@ -152,7 +152,7 @@ class NonFrontendDataTypeControllerTest : public testing::Test {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels()).
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
WillOnce(Return(true));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
}
@@ -166,7 +166,7 @@ class NonFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*dtc_mock_, StopAssociationAsync());
EXPECT_CALL(*dtc_mock_, StopModels());
EXPECT_CALL(service_, DeactivateDataType(_, _));
- EXPECT_CALL(*model_associator_, DisassociateModels());
+ EXPECT_CALL(*model_associator_, DisassociateModels(_));
}
void SetStartFailExpectations(DataTypeController::StartResult result) {
@@ -222,7 +222,7 @@ TEST_F(NonFrontendDataTypeControllerTest, StartFirstRun) {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels()).
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
WillOnce(Return(true));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
@@ -250,8 +250,9 @@ TEST_F(NonFrontendDataTypeControllerTest, StartAssociationFailed) {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(false));
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
+ WillOnce(DoAll(browser_sync::SetSyncError(syncable::AUTOFILL),
+ Return(false)));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
// Set up association to fail with an association failed error.
@@ -308,7 +309,7 @@ TEST_F(NonFrontendDataTypeControllerTest, AbortDuringAssociationInactive) {
Return(true)));
EXPECT_CALL(*model_associator_, AbortAssociation()).WillOnce(
SignalEvent(&pause_db_thread));
- EXPECT_CALL(*model_associator_, AssociateModels()).WillOnce(Return(true));
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).WillOnce(Return(true));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
EXPECT_CALL(service_, ActivateDataType(_, _));
EXPECT_CALL(start_callback_, Run(DataTypeController::ABORTED,_));
@@ -337,7 +338,7 @@ TEST_F(NonFrontendDataTypeControllerTest, AbortDuringAssociationActivated) {
Return(true)));
EXPECT_CALL(*model_associator_, AbortAssociation()).WillOnce(
SignalEvent(&pause_db_thread));
- EXPECT_CALL(*model_associator_, AssociateModels()).
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
WillOnce(Return(true));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
EXPECT_CALL(service_, ActivateDataType(_, _)).WillOnce(DoAll(
« no previous file with comments | « chrome/browser/sync/glue/non_frontend_data_type_controller.cc ('k') | chrome/browser/sync/glue/password_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698