Index: chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc |
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc |
index 4212b7d7701c1c60859f6f43e520b24533393930..d2276831754b4022172a43f382985d7e7ced7284 100644 |
--- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc |
+++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc |
@@ -49,7 +49,7 @@ ACTION_P(CopyData, data) { |
MATCHER_P(CheckSyncChanges, n_sync_changes_list, "") { |
if (arg.size() != n_sync_changes_list.size()) |
return false; |
- SyncChangeList::const_iterator passed, expected; |
+ csync::SyncChangeList::const_iterator passed, expected; |
for (passed = arg.begin(), expected = n_sync_changes_list.begin(); |
passed != arg.end() && expected != n_sync_changes_list.end(); |
++passed, ++expected) { |
@@ -87,14 +87,14 @@ MATCHER_P(DataBundleCheck, n_bundle, "") { |
return true; |
} |
-class MockSyncChangeProcessor : public SyncChangeProcessor { |
+class MockSyncChangeProcessor : public csync::SyncChangeProcessor { |
public: |
MockSyncChangeProcessor() {} |
virtual ~MockSyncChangeProcessor() {} |
MOCK_METHOD2(ProcessSyncChanges, |
- SyncError(const tracked_objects::Location&, |
- const SyncChangeList&)); |
+ csync::SyncError(const tracked_objects::Location&, |
+ const csync::SyncChangeList&)); |
}; |
class AutofillProfileSyncableServiceTest : public testing::Test { |
@@ -131,7 +131,7 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) { |
profiles_from_web_db.back()->SetInfo(ADDRESS_HOME_LINE1, |
UTF8ToUTF16("2 2nd st")); |
- SyncDataList data_list; |
+ csync::SyncDataList data_list; |
AutofillProfile profile1(guid_synced1); |
profile1.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane")); |
data_list.push_back(autofill_syncable_service_.CreateData(profile1)); |
@@ -143,9 +143,9 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) { |
profile3.SetInfo(NAME_FIRST, UTF8ToUTF16("Tom Doe")); |
data_list.push_back(autofill_syncable_service_.CreateData(profile3)); |
- SyncChangeList expected_change_list; |
+ csync::SyncChangeList expected_change_list; |
expected_change_list.push_back( |
- SyncChange(SyncChange::ACTION_ADD, |
+ csync::SyncChange(csync::SyncChange::ACTION_ADD, |
AutofillProfileSyncableService::CreateData( |
(*profiles_from_web_db.front())))); |
@@ -162,17 +162,17 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) { |
.Times(1) |
.WillOnce(Return(true)); |
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _)) |
- .WillByDefault(Return(SyncError())); |
+ .WillByDefault(Return(csync::SyncError())); |
EXPECT_CALL(*sync_processor_, |
ProcessSyncChanges(_, CheckSyncChanges(expected_change_list))) |
.Times(1) |
- .WillOnce(Return(SyncError())); |
+ .WillOnce(Return(csync::SyncError())); |
// Takes ownership of sync_processor_. |
autofill_syncable_service_.MergeDataAndStartSyncing( |
syncable::AUTOFILL_PROFILE, data_list, |
- sync_processor_.PassAs<SyncChangeProcessor>(), |
- scoped_ptr<SyncErrorFactory>(new SyncErrorFactoryMock())); |
+ sync_processor_.PassAs<csync::SyncChangeProcessor>(), |
+ scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock())); |
autofill_syncable_service_.StopSyncing(syncable::AUTOFILL_PROFILE); |
} |
@@ -193,20 +193,22 @@ TEST_F(AutofillProfileSyncableServiceTest, GetAllSyncData) { |
.Times(1) |
.WillOnce(Return(true)); |
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _)) |
- .WillByDefault(Return(SyncError())); |
+ .WillByDefault(Return(csync::SyncError())); |
EXPECT_CALL(*sync_processor_, |
- ProcessSyncChanges(_, Property(&SyncChangeList::size, Eq(2U)))) |
+ ProcessSyncChanges( |
+ _, |
+ Property(&csync::SyncChangeList::size, Eq(2U)))) |
.Times(1) |
- .WillOnce(Return(SyncError())); |
+ .WillOnce(Return(csync::SyncError())); |
- SyncDataList data_list; |
+ csync::SyncDataList data_list; |
// Takes ownership of sync_processor_. |
autofill_syncable_service_.MergeDataAndStartSyncing( |
syncable::AUTOFILL_PROFILE, data_list, |
- sync_processor_.PassAs<SyncChangeProcessor>(), |
- scoped_ptr<SyncErrorFactory>(new SyncErrorFactoryMock())); |
+ sync_processor_.PassAs<csync::SyncChangeProcessor>(), |
+ scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock())); |
- SyncDataList data = |
+ csync::SyncDataList data = |
autofill_syncable_service_.GetAllSyncData(syncable::AUTOFILL_PROFILE); |
EXPECT_EQ(2U, data.size()); |
@@ -221,15 +223,15 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) { |
std::string guid_present = kGuid1; |
std::string guid_synced = kGuid2; |
- SyncChangeList change_list; |
+ csync::SyncChangeList change_list; |
AutofillProfile profile(guid_synced); |
profile.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane")); |
change_list.push_back( |
- SyncChange(SyncChange::ACTION_ADD, |
+ csync::SyncChange(csync::SyncChange::ACTION_ADD, |
AutofillProfileSyncableService::CreateData(profile))); |
AutofillProfile empty_profile(guid_present); |
change_list.push_back( |
- SyncChange(SyncChange::ACTION_DELETE, |
+ csync::SyncChange(csync::SyncChange::ACTION_DELETE, |
AutofillProfileSyncableService::CreateData(empty_profile))); |
AutofillProfileSyncableService::DataBundle expected_bundle; |
@@ -242,7 +244,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) { |
.WillOnce(Return(true)); |
autofill_syncable_service_.set_sync_processor(sync_processor_.release()); |
- SyncError error = autofill_syncable_service_.ProcessSyncChanges( |
+ csync::SyncError error = autofill_syncable_service_.ProcessSyncChanges( |
FROM_HERE, change_list); |
EXPECT_FALSE(error.IsSet()); |
@@ -254,7 +256,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ActOnChange) { |
AutofillProfileChange change1(AutofillProfileChange::ADD, kGuid1, &profile); |
AutofillProfileChange change2(AutofillProfileChange::REMOVE, kGuid2, NULL); |
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _)) |
- .WillByDefault(Return(SyncError(FROM_HERE, std::string("an error"), |
+ .WillByDefault(Return(csync::SyncError(FROM_HERE, std::string("an error"), |
syncable::AUTOFILL_PROFILE))); |
EXPECT_CALL(*sync_processor_, ProcessSyncChanges(_, _)).Times(2); |