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

Unified Diff: chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc

Issue 11360055: [Autofill] Rename GetInfo and SetInfo to GetRawInfo and SetRawInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder Created 8 years, 1 month 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/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 5ffa1900ffc5f4d5ca260e6deb04b7db7aa22d41..4d0cffc93850912e06d09b2b1917f2bec3db93fa 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
@@ -123,24 +123,24 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
std::string guid_synced2 = kGuid4;
profiles_from_web_db.push_back(new AutofillProfile(guid_present1));
- profiles_from_web_db.back()->SetInfo(NAME_FIRST, UTF8ToUTF16("John"));
- profiles_from_web_db.back()->SetInfo(ADDRESS_HOME_LINE1,
- UTF8ToUTF16("1 1st st"));
+ profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John"));
+ profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1,
+ UTF8ToUTF16("1 1st st"));
profiles_from_web_db.push_back(new AutofillProfile(guid_present2));
- profiles_from_web_db.back()->SetInfo(NAME_FIRST, UTF8ToUTF16("Tom"));
- profiles_from_web_db.back()->SetInfo(ADDRESS_HOME_LINE1,
- UTF8ToUTF16("2 2nd st"));
+ profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom"));
+ profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1,
+ UTF8ToUTF16("2 2nd st"));
syncer::SyncDataList data_list;
AutofillProfile profile1(guid_synced1);
- profile1.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
+ profile1.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
data_list.push_back(autofill_syncable_service_.CreateData(profile1));
AutofillProfile profile2(guid_synced2);
- profile2.SetInfo(NAME_FIRST, UTF8ToUTF16("Harry"));
+ profile2.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Harry"));
data_list.push_back(autofill_syncable_service_.CreateData(profile2));
// This one will have the name updated.
AutofillProfile profile3(guid_present2);
- profile3.SetInfo(NAME_FIRST, UTF8ToUTF16("Tom Doe"));
+ profile3.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom Doe"));
data_list.push_back(autofill_syncable_service_.CreateData(profile3));
syncer::SyncChangeList expected_change_list;
@@ -183,9 +183,9 @@ TEST_F(AutofillProfileSyncableServiceTest, GetAllSyncData) {
std::string guid_present2 = kGuid2;
profiles_from_web_db.push_back(new AutofillProfile(guid_present1));
- profiles_from_web_db.back()->SetInfo(NAME_FIRST, UTF8ToUTF16("John"));
+ profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John"));
profiles_from_web_db.push_back(new AutofillProfile(guid_present2));
- profiles_from_web_db.back()->SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
+ profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
EXPECT_CALL(autofill_syncable_service_, LoadAutofillData(_))
.Times(1)
@@ -226,7 +226,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) {
syncer::SyncChangeList change_list;
AutofillProfile profile(guid_synced);
- profile.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
+ profile.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
change_list.push_back(
syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_ADD,
@@ -256,7 +256,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) {
TEST_F(AutofillProfileSyncableServiceTest, ActOnChange) {
AutofillProfile profile(kGuid1);
- profile.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
+ profile.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
AutofillProfileChange change1(AutofillProfileChange::ADD, kGuid1, &profile);
AutofillProfileChange change2(AutofillProfileChange::REMOVE, kGuid2, NULL);
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _))
@@ -274,16 +274,16 @@ TEST_F(AutofillProfileSyncableServiceTest, UpdateField) {
AutofillProfile profile(kGuid1);
std::string company1 = "A Company";
std::string company2 = "Another Company";
- profile.SetInfo(COMPANY_NAME, UTF8ToUTF16(company1));
+ profile.SetRawInfo(COMPANY_NAME, UTF8ToUTF16(company1));
EXPECT_FALSE(AutofillProfileSyncableService::UpdateField(
COMPANY_NAME, company1, &profile));
- EXPECT_EQ(profile.GetInfo(COMPANY_NAME), UTF8ToUTF16(company1));
+ EXPECT_EQ(profile.GetRawInfo(COMPANY_NAME), UTF8ToUTF16(company1));
EXPECT_TRUE(AutofillProfileSyncableService::UpdateField(
COMPANY_NAME, company2, &profile));
- EXPECT_EQ(profile.GetInfo(COMPANY_NAME), UTF8ToUTF16(company2));
+ EXPECT_EQ(profile.GetRawInfo(COMPANY_NAME), UTF8ToUTF16(company2));
EXPECT_FALSE(AutofillProfileSyncableService::UpdateField(
COMPANY_NAME, company2, &profile));
- EXPECT_EQ(profile.GetInfo(COMPANY_NAME), UTF8ToUTF16(company2));
+ EXPECT_EQ(profile.GetRawInfo(COMPANY_NAME), UTF8ToUTF16(company2));
}
TEST_F(AutofillProfileSyncableServiceTest, UpdateMultivaluedField) {
@@ -321,7 +321,7 @@ TEST_F(AutofillProfileSyncableServiceTest, UpdateMultivaluedField) {
TEST_F(AutofillProfileSyncableServiceTest, MergeProfile) {
AutofillProfile profile1(kGuid1);
- profile1.SetInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
+ profile1.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
std::vector<string16> values;
values.push_back(UTF8ToUTF16("1@1.com"));
@@ -329,7 +329,7 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeProfile) {
profile1.SetMultiInfo(EMAIL_ADDRESS, values);
AutofillProfile profile2(kGuid2);
- profile2.SetInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
+ profile2.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
// |values| now is [ "1@1.com", "2@1.com", "3@1.com" ].
values.push_back(UTF8ToUTF16("3@1.com"));
@@ -375,7 +375,7 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeProfile) {
EXPECT_EQ(values[0], UTF8ToUTF16("650234567"));
AutofillProfile profile3(kGuid3);
- profile3.SetInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
+ profile3.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("111 First St."));
values.clear();
values.push_back(UTF8ToUTF16("Jane"));
« no previous file with comments | « chrome/browser/webdata/autofill_profile_syncable_service.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698