#include "components/autofill/core/browser/data_model/autofill_profile_comparator.h"
#include <string_view>
#include "base/containers/contains.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_component.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_utils.h"
#include "components/autofill/core/browser/data_model/contact_info.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/alternative_state_name_map_test_utils.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
kLegacyHierarchyCountryCode;
const char kLocale[] = …;
class AutofillProfileComparatorTest : public testing::Test { … };
TEST_F(AutofillProfileComparatorTest, UniqueTokens) { … }
TEST_F(AutofillProfileComparatorTest, CompareTokens) { … }
TEST_F(AutofillProfileComparatorTest, Compare) { … }
TEST_F(AutofillProfileComparatorTest, NormalizeForComparison) { … }
TEST_F(AutofillProfileComparatorTest, GetNamePartVariants) { … }
TEST_F(AutofillProfileComparatorTest, IsNameVariantOf) { … }
TEST_F(AutofillProfileComparatorTest, HaveMergeableNames) { … }
TEST_F(AutofillProfileComparatorTest, HaveMergeableEmailAddresses) { … }
TEST_F(AutofillProfileComparatorTest, HaveMergeableCompanyNames) { … }
TEST_F(AutofillProfileComparatorTest, HaveMergeablePhoneNumbers) { … }
TEST_F(AutofillProfileComparatorTest, HaveMergeableAddresses) { … }
TEST_F(AutofillProfileComparatorTest, AreMergeable) { … }
TEST_F(AutofillProfileComparatorTest, MergeNames_WithPermutation) { … }
TEST_F(AutofillProfileComparatorTest, MergeNames) { … }
TEST_F(AutofillProfileComparatorTest, MergeCJKNames) { … }
TEST_F(AutofillProfileComparatorTest, MergeEmailAddresses) { … }
TEST_F(AutofillProfileComparatorTest, MergeCompanyNames) { … }
TEST_F(AutofillProfileComparatorTest, MergePhoneNumbers_NA) { … }
TEST_F(AutofillProfileComparatorTest, MergePhoneNumbers_Intl) { … }
TEST_F(AutofillProfileComparatorTest, MergeAddresses) { … }
TEST_F(AutofillProfileComparatorTest, MergeAddressesMostUniqueTokens) { … }
TEST_F(AutofillProfileComparatorTest, MergeAddressesWithStructure) { … }
TEST_F(AutofillProfileComparatorTest, MergeAddressesWithRewrite) { … }
TEST_F(AutofillProfileComparatorTest, MergeAddressesWithRewriteDE) { … }
TEST_F(AutofillProfileComparatorTest,
MergeAddressesDependentLocalityAndSortingCode) { … }
TEST_F(AutofillProfileComparatorTest, MergeLandmarkAndBetweenStreetsAndAdmin2) { … }
TEST_F(AutofillProfileComparatorTest, CheckStatesMergability) { … }
TEST_F(AutofillProfileComparatorTest,
ProfilesHaveDifferentSettingsVisibleValues) { … }
TEST_F(AutofillProfileComparatorTest, GetProfileDifference) { … }
TEST_F(AutofillProfileComparatorTest, GetProfileDifferenceMap) { … }
TEST_F(AutofillProfileComparatorTest, GetSettingsVisibleProfileDifference) { … }
TEST_F(AutofillProfileComparatorTest, GetSettingsVisibleProfileDifferenceMap) { … }
TEST_F(AutofillProfileComparatorTest, IsMergeCandidate) { … }
TEST_F(AutofillProfileComparatorTest, MergeProfilesBasedOnState) { … }
struct NonMergeableSettingVisibleTypesTestCase { … };
class NonMergeableSettingVisibleTypesTest
: public AutofillProfileComparatorTest,
public testing::WithParamInterface<
NonMergeableSettingVisibleTypesTestCase> { … };
TEST_P(NonMergeableSettingVisibleTypesTest, DifferingTypes) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(AutofillProfileComparatorTest,
NonMergeableSettingVisibleTypes_Mergeability) { … }
TEST_F(AutofillProfileComparatorTest,
NonMergeableSettingVisibleTypes_DifferentCountry) { … }
}
}