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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 1153663004: [Autofill] Remove (most) support for variants in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_autofill_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index e0110459e07771d8527ac8383a4d04795116cf41..d54036b31a5a98ccd0ce3e934afbb31abe7f79e7 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -884,29 +884,6 @@ class FakeServerUpdater : public base::RefCountedThreadSafe<FakeServerUpdater> {
syncer::syncable::Id parent_id_;
};
-namespace {
-
-// Checks if the field of type |field_type| in |profile1| includes all values
-// of the field in |profile2|.
-bool IncludesField(const AutofillProfile& profile1,
- const AutofillProfile& profile2,
- ServerFieldType field_type) {
- std::vector<base::string16> values1;
- profile1.GetRawMultiInfo(field_type, &values1);
- std::vector<base::string16> values2;
- profile2.GetRawMultiInfo(field_type, &values2);
-
- std::set<base::string16> values_set;
- for (size_t i = 0; i < values1.size(); ++i)
- values_set.insert(values1[i]);
- for (size_t i = 0; i < values2.size(); ++i)
- if (values_set.find(values2[i]) == values_set.end())
- return false;
- return true;
-}
-
-} // namespace
-
// TODO(skrul): Test abort startup.
// TODO(skrul): Test processing of cloud changes.
// TODO(tim): Add autofill data type controller test, and a case to cover
@@ -1137,14 +1114,6 @@ TEST_F(ProfileSyncServiceAutofillTest, HasNativeHasSyncMergeProfileCombine) {
ASSERT_EQ(1U, new_sync_profiles.size());
// Check that key fields are the same.
EXPECT_TRUE(new_sync_profiles[0].IsSubsetOf(sync_profile, "en-US"));
- // Check that multivalued fields of the synced back data include original
- // data.
- EXPECT_TRUE(
- IncludesField(new_sync_profiles[0], sync_profile, autofill::NAME_FULL));
- EXPECT_TRUE(IncludesField(
- new_sync_profiles[0], sync_profile, autofill::EMAIL_ADDRESS));
- EXPECT_TRUE(IncludesField(
- new_sync_profiles[0], sync_profile, autofill::PHONE_HOME_WHOLE_NUMBER));
}
TEST_F(ProfileSyncServiceAutofillTest, MergeProfileWithDifferentGuid) {
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698