#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <vector>
#include "base/format_macros.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile_comparator.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/country_data.h"
#include "components/autofill/core/browser/profile_token_quality.h"
#include "components/autofill/core/browser/profile_token_quality_test_api.h"
#include "components/autofill/core/browser/test_utils/test_profiles.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_field_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
UTF8ToUTF16;
ObservationType;
constexpr VerificationStatus kObserved = …;
namespace {
std::u16string GetSuggestionLabel(AutofillProfile* profile) { … }
void SetupTestProfile(AutofillProfile& profile) { … }
std::vector<raw_ptr<const AutofillProfile, VectorExperimental>>
ToRawPointerVector(const std::vector<std::unique_ptr<AutofillProfile>>& list) { … }
class AutofillProfileTest : public testing::Test { … };
TEST_F(AutofillProfileTest, PreviewSummaryString) { … }
TEST_F(AutofillProfileTest, AdjustInferredLabels) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsI18n_CH) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsI18n_FR) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsI18n_KR) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsI18n_JP_Latn) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsI18n_JP_ja) { … }
TEST_F(AutofillProfileTest, CreateInferredLabels) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsFallsBackToFullName) { … }
TEST_F(
AutofillProfileTest,
CreateInferredLabels_TriggeringFieldUsedToDecideWhetherToAddADifferentiatingLabel) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsNoDuplicatedFields) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsSkipsEmptyFields) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsFlattensMultiLineValues) { … }
TEST_F(AutofillProfileTest, CreateInferredLabelsDifferentiateByAddressLine2) { … }
TEST_F(AutofillProfileTest, IsSubsetOf) { … }
TEST_F(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentMiddleNames) { … }
TEST_F(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentFirstNames) { … }
TEST_F(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentLastNames) { … }
TEST_F(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentStreetAddresses) { … }
TEST_F(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentNonStreetAddresses) { … }
TEST_F(AutofillProfileTest,
IsSubsetOfForFieldSet_PostalCodesWithAndWithoutSpaces) { … }
TEST_F(AutofillProfileTest,
IsSubsetOfForFieldSet_PhoneNumbersWithAndWithoutSpacesAndPunctuation) { … }
TEST_F(AutofillProfileTest,
IsSubsetOfForFieldSet_PhoneNumbersWithAndWithoutCodes_US) { … }
TEST_F(AutofillProfileTest,
IsSubsetOfForFieldSet_PhoneNumbersWithAndWithoutCodes_BR) { … }
TEST_F(AutofillProfileTest, IsStrictSupersetOf) { … }
TEST_F(AutofillProfileTest, TestFinalizeAfterImport) { … }
TEST_F(AutofillProfileTest, SetAndGetRawInfoWithValidationStatus) { … }
TEST_F(AutofillProfileTest, SetAndGetInfoWithValidationStatus) { … }
TEST_F(AutofillProfileTest, MergeDataFrom_DifferentProfile) { … }
TEST_F(AutofillProfileTest, MergeDataFrom_SameProfile) { … }
TEST_F(AutofillProfileTest, MergeDataFrom_TokenQuality) { … }
TEST_F(AutofillProfileTest, OverwriteName_AddNameFull) { … }
TEST_F(AutofillProfileTest, OverwriteName_DifferentCase) { … }
TEST_F(AutofillProfileTest, AssignmentOperator) { … }
TEST_F(AutofillProfileTest, Copy) { … }
TEST_F(AutofillProfileTest, Compare) { … }
TEST_F(AutofillProfileTest, Compare_StructuredTypes) { … }
TEST_F(AutofillProfileTest, IsPresentButInvalid) { … }
TEST_F(AutofillProfileTest, SetRawInfoPreservesLineBreaks) { … }
TEST_F(AutofillProfileTest, SetInfoPreservesLineBreaks) { … }
TEST_F(AutofillProfileTest, SetRawInfoDoesntTrimWhitespace) { … }
TEST_F(AutofillProfileTest, SetRawInfoWorksForLandmark) { … }
TEST_F(AutofillProfileTest, SetRawInfoWorksForBetweenStreets) { … }
TEST_F(AutofillProfileTest, SetInfoTrimsWhitespace) { … }
TEST_F(AutofillProfileTest, SetAndGetProfileLabels) { … }
TEST_F(AutofillProfileTest, LabelsInAssignmentAndComparisonOperator) { … }
TEST_F(AutofillProfileTest, RecordUseAndLog_Delay) { … }
TEST_F(AutofillProfileTest, HasStructuredData) { … }
TEST_F(AutofillProfileTest, ConvertToAccountProfile) { … }
TEST_F(AutofillProfileTest, RemoveInaccessibleProfileValues) { … }
TEST_F(AutofillProfileTest, GetStorableTypeOf) { … }
TEST_F(AutofillProfileTest, EmitsDaysUntilFirstUsageProfile) { … }
enum Expectation { … };
struct ProfileRankingTestCase { … };
class ProfileRankingTest
: public AutofillProfileTest,
public testing::WithParamInterface<ProfileRankingTestCase> { … };
TEST_P(ProfileRankingTest, HasGreaterRankingThan) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}