#include "components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/autofill_profile_test_api.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_component.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/test_autofill_clock.h"
#include "components/autofill/core/browser/webdata/autofill_table_utils.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/sync/protocol/autofill_specifics.pb.h"
#include "components/sync/protocol/entity_data.h"
#include "components/sync/protocol/entity_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
ASCIIToUTF16;
UTF16ToUTF8;
UTF8ToUTF16;
AutofillProfileSpecifics;
EntityData;
const char kGuid[] = …;
const char kGuidInvalid[] = …;
const base::Time kJune2017 = …;
AutofillProfile ConstructBaseProfile(
AddressCountryCode country_code = AddressCountryCode("ES")) { … }
AutofillProfile ConstructCompleteProfileBR() { … }
AutofillProfile ConstructCompleteProfileAU() { … }
AutofillProfile ConstructCompleteProfileDE() { … }
AutofillProfile ConstructCompleteProfileMX() { … }
AutofillProfile ConstructCompleteProfileIN() { … }
AutofillProfileSpecifics ConstructBaseSpecifics() { … }
AutofillProfileSpecifics ConstructCompleteSpecificsBR() { … }
AutofillProfileSpecifics ConstructCompleteSpecificsAU() { … }
AutofillProfileSpecifics ConstructCompleteSpecificsDE() { … }
AutofillProfileSpecifics ConstructCompleteSpecificsMX() { … }
AutofillProfileSpecifics ConstructCompleteSpecificsIN() { … }
enum class I18nCountryModel { … };
class AutofillProfileSyncUtilTest
: public testing::Test,
public testing::WithParamInterface<I18nCountryModel> { … };
TEST_P(AutofillProfileSyncUtilTest, CreateEntityDataFromAutofillProfile) { … }
TEST_F(AutofillProfileSyncUtilTest, CreateEntityDataFromAutofillProfile_Empty) { … }
TEST_F(AutofillProfileSyncUtilTest,
CreateEntityDataFromAutofillProfile_Trimmed) { … }
TEST_F(AutofillProfileSyncUtilTest,
CreateEntityDataFromAutofillProfile_TrimmedNonASCII) { … }
TEST_P(AutofillProfileSyncUtilTest, CreateAutofillProfileFromSpecifics) { … }
TEST_F(AutofillProfileSyncUtilTest, CreateAutofillProfileFromSpecifics_Empty) { … }
TEST_F(AutofillProfileSyncUtilTest,
CreateAutofillProfileFromSpecifics_Invalid) { … }
TEST_F(AutofillProfileSyncUtilTest,
CreateAutofillProfileFromSpecifics_HomeAddressWins) { … }
TEST_F(AutofillProfileSyncUtilTest,
CreateAutofillProfileFromSpecifics_CountryNameParsed) { … }
TEST_F(AutofillProfileSyncUtilTest, GetStorageKeyFromAutofillProfile) { … }
TEST_F(AutofillProfileSyncUtilTest, GetStorageKeyFromAutofillProfileSpecifics) { … }
TEST_F(AutofillProfileSyncUtilTest,
GetStorageKeyFromAutofillProfileSpecifics_Invalid) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}