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

Unified Diff: components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

Issue 2164143002: Use the max use count on autofill profile merge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better documentation Created 4 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
« no previous file with comments | « components/autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/browser/profile_sync_service_autofill_unittest.cc
diff --git a/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc b/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc
index df6b928b207e9ed97cc561df0131b15661e6e4d8..23dc3f8e124f370c7ce795b113d3fcac70e90bce 100644
--- a/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc
+++ b/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc
@@ -1029,7 +1029,7 @@ TEST_F(
AutofillProfile expected_profile(sync_profile);
expected_profile.SetRawInfo(NAME_FULL,
ASCIIToUTF16("Billing Mitchell Morrison"));
- expected_profile.set_use_count(2);
+ expected_profile.set_use_count(1);
std::vector<AutofillProfile*> native_profiles;
native_profiles.push_back(native_profile);
@@ -1062,7 +1062,7 @@ TEST_F(
// Check that the latest use date is saved.
EXPECT_EQ(base::Time::FromTimeT(4321), new_sync_profiles[0].use_date());
// Check that the use counts were added (default value is 1).
- EXPECT_EQ(2U, new_sync_profiles[0].use_count());
+ EXPECT_EQ(1U, new_sync_profiles[0].use_count());
}
// Tests that a sync with a new native profile that matches an older new sync
@@ -1089,7 +1089,7 @@ TEST_F(ProfileSyncServiceAutofillTest,
AutofillProfile expected_profile(sync_profile);
expected_profile.SetRawInfo(NAME_FULL,
ASCIIToUTF16("Billing Mitchell Morrison"));
- expected_profile.set_use_count(2);
+ expected_profile.set_use_count(1);
expected_profile.set_use_date(native_profile->use_date());
std::vector<AutofillProfile*> native_profiles;
@@ -1123,7 +1123,7 @@ TEST_F(ProfileSyncServiceAutofillTest,
// Check that the latest use date is saved.
EXPECT_EQ(base::Time::FromTimeT(4321), new_sync_profiles[0].use_date());
// Check that the use counts were added (default value is 1).
- EXPECT_EQ(2U, new_sync_profiles[0].use_count());
+ EXPECT_EQ(1U, new_sync_profiles[0].use_count());
}
// Tests that a sync with a new native profile that matches an a new sync
@@ -1153,7 +1153,7 @@ TEST_F(ProfileSyncServiceAutofillTest,
expected_profile.SetRawInfo(NAME_FULL,
ASCIIToUTF16("Billing Mitchell Morrison"));
expected_profile.set_use_date(sync_profile.use_date());
- expected_profile.set_use_count(2);
+ expected_profile.set_use_count(1);
std::vector<AutofillProfile*> native_profiles;
native_profiles.push_back(native_profile);
@@ -1187,7 +1187,7 @@ TEST_F(ProfileSyncServiceAutofillTest,
// Check that the latest use date is saved.
EXPECT_EQ(base::Time::FromTimeT(4321), new_sync_profiles[0].use_date());
// Check that the use counts were added (default value is 1).
- EXPECT_EQ(2U, new_sync_profiles[0].use_count());
+ EXPECT_EQ(1U, new_sync_profiles[0].use_count());
}
// Tests that a sync with a new native profile that differ only by name a new
« no previous file with comments | « components/autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698