#include "third_party/libaddressinput/chromium/chrome_address_validator.h"
#include <stddef.h>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_problem.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_ui.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/null_storage.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
#include "third_party/libaddressinput/src/cpp/test/testdata_source.h"
namespace autofill {
AddressData;
AddressField;
AddressProblem;
BuildCallback;
FieldProblemMap;
GetRegionCodes;
NullStorage;
Source;
Storage;
TestdataSource;
COUNTRY;
ADMIN_AREA;
LOCALITY;
DEPENDENT_LOCALITY;
SORTING_CODE;
POSTAL_CODE;
STREET_ADDRESS;
RECIPIENT;
INVALID_FORMAT;
MISMATCHING_VALUE;
MISSING_REQUIRED_FIELD;
UNEXPECTED_FIELD;
UNKNOWN_VALUE;
UNSUPPORTED_FIELD;
USES_P_O_BOX;
class AddressValidatorTest : public testing::Test, LoadRulesListener { … };
class LargeAddressValidatorTest : public testing::Test { … };
AddressValidator* LargeAddressValidatorTest::validator_ = …;
TEST_F(AddressValidatorTest, SubKeysLoaded) { … }
TEST_F(AddressValidatorTest, SubKeysLoaded_DefaultLanguage) { … }
TEST_F(AddressValidatorTest, SubKeysLoaded_NonDefaultLanguage) { … }
TEST_F(AddressValidatorTest, SubKeysLoaded_LanguageNotAvailable) { … }
TEST_F(AddressValidatorTest, SubKeysLoaded_NamesNotAvailable) { … }
TEST_F(AddressValidatorTest, SubKeysNotExist) { … }
TEST_F(AddressValidatorTest, RegionHasRules) { … }
TEST_F(AddressValidatorTest, EmptyAddressNoFatalFailure) { … }
TEST_F(AddressValidatorTest, UsStateNamesAreValidEntries) { … }
TEST_F(AddressValidatorTest, USZipCode) { … }
TEST_F(AddressValidatorTest, BasicValidation) { … }
TEST_F(AddressValidatorTest, BasicValidationFailure) { … }
TEST_F(AddressValidatorTest, NormalizeUsAdminAreaName) { … }
TEST_F(AddressValidatorTest, NormalizeUsAdminAreaKey) { … }
TEST_F(AddressValidatorTest, NormalizeJpAdminAreaKey) { … }
TEST_F(AddressValidatorTest, NormalizeJpAdminAreaLatinName) { … }
TEST_F(AddressValidatorTest, AreRulesLoadedForRegion_NotLoaded) { … }
TEST_F(AddressValidatorTest, AreRulesLoadedForRegion_Loaded) { … }
TEST_F(AddressValidatorTest, ValidateRequiredFieldsWithoutRules) { … }
TEST_F(AddressValidatorTest,
DoNotValidateRequiredFieldsWithoutRulesWhenErrorIsFiltered) { … }
class FailingAddressValidatorTest : public testing::Test, LoadRulesListener { … };
TEST_F(FailingAddressValidatorTest, RetryLoadingRulesHasLimit) { … }
TEST_F(FailingAddressValidatorTest, RuleRetryingWillSucceed) { … }
TEST_F(FailingAddressValidatorTest, DestroyedValidatorStopsRetries) { … }
TEST_F(FailingAddressValidatorTest, LoadingRulesSecondTimeSucceeds) { … }
TEST_F(FailingAddressValidatorTest, RegionsShouldRetryIndividually) { … }
}