#include "components/autofill/core/browser/webdata/addresses/contact_info_sync_util.h"
#include "base/feature_list.h"
#include "base/hash/hash.h"
#include "base/strings/to_string.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile_test_api.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/profile_token_quality_test_api.h"
#include "components/autofill/core/common/autofill_features.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
ContactInfoSpecifics;
constexpr char kGuid[] = …;
constexpr char kInvalidGuid[] = …;
constexpr int kNonChromeModifier = …;
const auto kUseDate = …;
const auto kUseDate2 = …;
const auto kModificationDate = …;
AutofillProfile ConstructBaseProfile(
AddressCountryCode country_code = AddressCountryCode("ES")) { … }
AutofillProfile ConstructCompleteProfileAU() { … }
AutofillProfile ConstructCompleteProfileDE() { … }
AutofillProfile ConstructCompleteProfileBR() { … }
AutofillProfile ConstructCompleteProfileMX() { … }
AutofillProfile ConstructCompleteProfileIN() { … }
template <typename TokenType, typename Value>
void SetToken(TokenType* token,
const Value& value,
ContactInfoSpecifics::VerificationStatus status) { … }
ContactInfoSpecifics ConstructBaseSpecifics() { … }
ContactInfoSpecifics ConstructCompleteSpecificsAU() { … }
ContactInfoSpecifics ConstructCompleteSpecificsDE() { … }
ContactInfoSpecifics ConstructCompleteSpecificsBR() { … }
ContactInfoSpecifics ConstructCompleteSpecificsMX() { … }
ContactInfoSpecifics ConstructCompleteSpecificsIN() { … }
}
enum class I18nCountryModel { … };
class ContactInfoSyncUtilTest
: public testing::Test,
public testing::WithParamInterface<I18nCountryModel> { … };
TEST_P(ContactInfoSyncUtilTest,
CreateContactInfoEntityDataFromAutofillProfile) { … }
TEST_F(ContactInfoSyncUtilTest,
CreateContactInfoEntityDataFromAutofillProfile_InvalidGUID) { … }
TEST_F(ContactInfoSyncUtilTest,
CreateContactInfoEntityDataFromAutofillProfile_InvalidRecordType) { … }
TEST_F(ContactInfoSyncUtilTest, TrimAllSupportedFieldsFromRemoteSpecifics) { … }
TEST_F(ContactInfoSyncUtilTest,
TrimAllSupportedFieldsFromRemoteSpecifics_PreserveUnsupportedFields) { … }
TEST_P(ContactInfoSyncUtilTest, ContactInfoSpecificsFromAutofillProfile) { … }
TEST_P(ContactInfoSyncUtilTest, CreateAutofillProfileFromContactInfoSpecifics) { … }
TEST_F(ContactInfoSyncUtilTest,
CreateAutofillProfileFromContactInfoSpecifics_InvalidGUID) { … }
TEST_F(ContactInfoSyncUtilTest, ObservationResetting) { … }
INSTANTIATE_TEST_SUITE_P(…);
}