chromium/components/autofill/core/browser/data_model/autofill_structured_address_unittest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 setting the first address line.
TEST_F(AutofillStructuredAddress, TestSettingsAddressLine1) {}

// Test settings all three address lines.
TEST_F(AutofillStructuredAddress, TestSettingsAddressLines) {}

// Test setting the home street address and retrieving the address lines.
TEST_F(AutofillStructuredAddress, TestGettingAddressLines) {}

// Test setting the home street address and retrieving the address lines.
TEST_F(AutofillStructuredAddress,
       TestGettingAddressLines_JoinedAdditionalLines) {}

// Tests that a structured address gets successfully migrated and subsequently
// completed.
TEST_F(AutofillStructuredAddress, TestMigrationAndFinalization) {}

// Tests that the migration does not happen of the root node
// (ADDRESS_HOME_ADDRESS) already has a verification status.
TEST_F(AutofillStructuredAddress,
       TestMigrationAndFinalization_AlreadyMigrated) {}

// Tests that a valid address structure is not wiped.
TEST_F(AutofillStructuredAddress,
       TestWipingAnInvalidSubstructure_ValidStructure) {}

// Tests that an invalid address structure is wiped.
TEST_F(AutofillStructuredAddress,
       TestWipingAnInvalidSubstructure_InValidStructure) {}

// Test that the correct common country between structured addresses is
// computed.
TEST_F(AutofillStructuredAddress, TestGetCommonCountry) {}

// Tests retrieving a value for comparison for a field type.
TEST_F(AutofillStructuredAddress, TestGetValueForComparisonForType) {}

// Tests that when merging two equivalent street addresses, the longer one is
// preferred in merging.
TEST_F(AutofillStructuredAddress,
       LongerEquivalentStreetAddressHasPrecedenceInMerging) {}

struct MergeStatesWithCanonicalNamesTestCase {};

class MergeStatesWithCanonicalNamesTest
    : public testing::Test,
      public testing::WithParamInterface<
          MergeStatesWithCanonicalNamesTestCase> {};

// Test that the correct country for merging structured addresses is computed.
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) {}

}  // namespace

}  // namespace autofill