|
|
Created:
6 years, 11 months ago by Ilya Sherman Modified:
6 years, 11 months ago Reviewers:
Evan Stade CC:
chromium-reviews, browser-components-watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
Description[Autofill] Style cleanup: Use ASCIIToUTF16 rather than UTF8ToUTF16 in test code.
BUG=none
TEST=none
R=estade@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244110
Patch Set 1 #Patch Set 2 : Rebase #Messages
Total messages: 6 (0 generated)
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/129753002/1
Failed to apply patch for chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc Hunk #1 FAILED at 22. Hunk #2 succeeded at 275 (offset 88 lines). Hunk #3 succeeded at 326 (offset 88 lines). Hunk #4 succeeded at 380 (offset 88 lines). Hunk #5 succeeded at 438 (offset 88 lines). Hunk #6 succeeded at 475 (offset 76 lines). Hunk #7 succeeded at 516 (offset 76 lines). Hunk #8 succeeded at 552 (offset 76 lines). Hunk #9 succeeded at 588 (offset 76 lines). Hunk #10 succeeded at 616 (offset 76 lines). Hunk #11 succeeded at 671 (offset 76 lines). Hunk #12 succeeded at 708 (offset 76 lines). Hunk #13 succeeded at 727 with fuzz 1 (offset 76 lines). 1 out of 13 hunks FAILED -- saving rejects to file chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc.rej Patch: chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc 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 93546e84903924bd9fa521cfe5a9dd7652d38701..d9dfaac80ecf124106d5d3e17c3f255822eed2dd 100644 --- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc +++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc @@ -22,7 +22,7 @@ using ::testing::DoAll; using ::testing::Eq; using ::testing::Return; using ::testing::Property; -using base::UTF8ToUTF16; +using base::ASCIIToUTF16; using content::BrowserThread; // Some guids for testing. @@ -187,25 +187,25 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) { profiles_from_web_db.push_back( new AutofillProfile(guid_present1, origin_present1)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("1 1st st")); + ASCIIToUTF16("1 1st st")); profiles_from_web_db.push_back( new AutofillProfile(guid_present2, origin_present2)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("2 2nd st")); + ASCIIToUTF16("2 2nd st")); syncer::SyncDataList data_list; AutofillProfile profile1(guid_synced1, origin_synced1); - profile1.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane")); + profile1.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Jane")); data_list.push_back(autofill_syncable_service_.CreateData(profile1)); AutofillProfile profile2(guid_synced2, origin_synced2); - profile2.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Harry")); + profile2.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Harry")); data_list.push_back(autofill_syncable_service_.CreateData(profile2)); // This one will have the name and origin updated. AutofillProfile profile3(guid_present2, origin_synced2); - profile3.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom Doe")); + profile3.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom Doe")); data_list.push_back(autofill_syncable_service_.CreateData(profile3)); syncer::SyncChangeList expected_change_list; @@ -238,25 +238,25 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeIdenticalProfiles) { profiles_from_web_db.push_back( new AutofillProfile(guid_present1, origin_present1)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("1 1st st")); + ASCIIToUTF16("1 1st st")); profiles_from_web_db.push_back( new AutofillProfile(guid_present2, origin_present2)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("2 2nd st")); + ASCIIToUTF16("2 2nd st")); // The synced profiles are identical to the local ones, except that the guids // are different. syncer::SyncDataList data_list; AutofillProfile profile1(guid_synced1, origin_synced1); - profile1.SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); - profile1.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("1 1st st")); + profile1.SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); + profile1.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1 1st st")); data_list.push_back(autofill_syncable_service_.CreateData(profile1)); AutofillProfile profile2(guid_synced2, origin_synced2); - profile2.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom")); - profile2.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("2 2nd st")); + profile2.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom")); + profile2.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("2 2nd st")); data_list.push_back(autofill_syncable_service_.CreateData(profile2)); AutofillProfile expected_profile(profile2); @@ -292,27 +292,27 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeSimilarProfiles) { profiles_from_web_db.push_back( new AutofillProfile(guid_present1, origin_present1)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("1 1st st")); + ASCIIToUTF16("1 1st st")); profiles_from_web_db.push_back( new AutofillProfile(guid_present2, origin_present2)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom")); profiles_from_web_db.back()->SetRawInfo(ADDRESS_HOME_LINE1, - UTF8ToUTF16("2 2nd st")); + ASCIIToUTF16("2 2nd st")); // The synced profiles are identical to the local ones, except that the guids // are different. syncer::SyncDataList data_list; AutofillProfile profile1(guid_synced1, origin_synced1); - profile1.SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); - profile1.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("1 1st st")); - profile1.SetRawInfo(COMPANY_NAME, UTF8ToUTF16("Frobbers, Inc.")); + profile1.SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); + profile1.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1 1st st")); + profile1.SetRawInfo(COMPANY_NAME, ASCIIToUTF16("Frobbers, Inc.")); data_list.push_back(autofill_syncable_service_.CreateData(profile1)); AutofillProfile profile2(guid_synced2, origin_synced2); - profile2.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Tom")); - profile2.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("2 2nd st")); - profile2.SetRawInfo(COMPANY_NAME, UTF8ToUTF16("Fizzbang, LLC.")); + profile2.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Tom")); + profile2.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("2 2nd st")); + profile2.SetRawInfo(COMPANY_NAME, ASCIIToUTF16("Fizzbang, LLC.")); data_list.push_back(autofill_syncable_service_.CreateData(profile2)); // The first profile should have its origin updated. @@ -350,8 +350,8 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataEmptyOrigins) { // Create a profile with an empty origin. AutofillProfile profile(kGuid1, std::string()); - profile.SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); - profile.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("1 1st st")); + profile.SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); + profile.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1 1st st")); profiles_from_web_db.push_back(new AutofillProfile(profile)); @@ -399,10 +399,10 @@ TEST_F(AutofillProfileSyncableServiceTest, GetAllSyncData) { profiles_from_web_db.push_back( new AutofillProfile(guid_present1, kHttpOrigin)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("John")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("John")); profiles_from_web_db.push_back( new AutofillProfile(guid_present2, kHttpsOrigin)); - profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane")); + profiles_from_web_db.back()->SetRawInfo(NAME_FIRST, ASCIIToUTF16("Jane")); syncer::SyncChangeList expected_change_list; expected_change_list.push_back( @@ -440,7 +440,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) { syncer::SyncChangeList change_list; AutofillProfile profile(guid_synced, kHttpOrigin); - profile.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane")); + profile.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Jane")); change_list.push_back( syncer::SyncChange( FROM_HERE, @@ -476,7 +476,7 @@ TEST_F(AutofillProfileSyncableServiceTest, AutofillProfileAdded) { autofill_syncable_service_.set_sync_processor(sync_change_processor); AutofillProfile profile(kGuid1, kHttpsOrigin); - profile.SetRawInfo(NAME_FIRST, UTF8ToUTF16("Jane")); + profile.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Jane")); AutofillProfileChange change(AutofillProfileChange::ADD, kGuid1, &profile); autofill_syncable_service_.AutofillProfileChanged(change); @@ -512,24 +512,24 @@ TEST_F(AutofillProfileSyncableServiceTest, UpdateField) { AutofillProfile profile(kGuid1, kSettingsOrigin⦠(message too large)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/129753002/70001
Message was sent while issue was closed.
Change committed as 244110 |