#include "components/autofill/core/browser/data_model/autofill_structured_address.h"
#include <stddef.h>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/data_model/autofill_i18n_api.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_component.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_component_test_api.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_test_utils.h"
#include "components/autofill/core/browser/data_model/autofill_structured_address_utils.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/alternative_state_name_map.h"
#include "components/autofill/core/browser/geo/alternative_state_name_map_test_utils.h"
#include "components/autofill/core/common/autofill_features.h"
#include "testing/gtest/include/gtest/gtest.h"
ASCIIToUTF16;
namespace autofill {
AddressComponentTestValues;
struct AddressLineParsingTestCase { … };
std::ostream& operator<<(std::ostream& out,
const AddressLineParsingTestCase& test_case) { … }
class AutofillStructuredAddress : public testing::Test { … };
void TestAddressLineParsing(const AddressLineParsingTestCase& test_case) { … }
void TestAddressLineFormatting(const AddressLineParsingTestCase& test_case) { … }
AddressComponentTestValues;
namespace {
TEST_F(AutofillStructuredAddress, ParseStreetAddress) { … }
TEST_F(AutofillStructuredAddress, ParseMultiLineStreetAddress) { … }
TEST_F(AutofillStructuredAddress, TestStreetAddressFormatting) { … }
TEST_F(AutofillStructuredAddress, TestSettingsAddressLine1) { … }
TEST_F(AutofillStructuredAddress, TestSettingsAddressLines) { … }
TEST_F(AutofillStructuredAddress, TestGettingAddressLines) { … }
TEST_F(AutofillStructuredAddress,
TestGettingAddressLines_JoinedAdditionalLines) { … }
TEST_F(AutofillStructuredAddress, TestMigrationAndFinalization) { … }
TEST_F(AutofillStructuredAddress,
TestMigrationAndFinalization_AlreadyMigrated) { … }
TEST_F(AutofillStructuredAddress,
TestWipingAnInvalidSubstructure_ValidStructure) { … }
TEST_F(AutofillStructuredAddress,
TestWipingAnInvalidSubstructure_InValidStructure) { … }
TEST_F(AutofillStructuredAddress, TestGetCommonCountry) { … }
TEST_F(AutofillStructuredAddress, TestGetValueForComparisonForType) { … }
TEST_F(AutofillStructuredAddress,
LongerEquivalentStreetAddressHasPrecedenceInMerging) { … }
struct MergeStatesWithCanonicalNamesTestCase { … };
class MergeStatesWithCanonicalNamesTest
: public testing::Test,
public testing::WithParamInterface<
MergeStatesWithCanonicalNamesTestCase> { … };
TEST_P(MergeStatesWithCanonicalNamesTest, MergeTest) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(AutofillStructuredAddress, ParseStreetAddressLegacy) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressMX) { … }
TEST_F(AutofillStructuredAddress, ParseSubpremiseMX) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressBR) { … }
TEST_F(AutofillStructuredAddress, ParseOverflowAndLandmarkBR) { … }
TEST_F(AutofillStructuredAddress, ParseSubpremiseBR) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressDE) { … }
TEST_F(AutofillStructuredAddress, ParseStreetLocationDE) { … }
TEST_F(AutofillStructuredAddress, ParseSubpremiseAU) { … }
TEST_F(AutofillStructuredAddress, ParseStreetLocationAU) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressAU) { … }
TEST_F(AutofillStructuredAddress, TestFormattingPL) { … }
TEST_F(AutofillStructuredAddress, ParseBuildingAndUnitPL) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressPL) { … }
TEST_F(AutofillStructuredAddress, TestFormattingIT) { … }
TEST_F(AutofillStructuredAddress, ParseStreetLocationIT) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressIT) { … }
TEST_F(AutofillStructuredAddress, ParseStreetLocationFR) { … }
TEST_F(AutofillStructuredAddress, ParseStreetAddressFR) { … }
}
}