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

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

#include <stddef.h>

#include <string>

#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/address.h"
#include "components/autofill/core/browser/data_model/autofill_i18n_api.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_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

kLegacyHierarchyCountryCode;
ASCIIToUTF16;

namespace autofill {

class AddressTest : public testing::Test {};

// Test that country data can be properly returned as either a country code or a
// localized country name.
TEST_F(AddressTest, GetCountry) {}

// Test that country data can be properly returned as either a country code or a
// full country name that can even be localized.
TEST_F(AddressTest, SetHtmlCountryCodeTypeWithFullCountryName) {}

// Test that we properly detect country codes appropriate for each country.
TEST_F(AddressTest, SetCountry) {}

// Test setting and getting the new structured address tokens
TEST_F(AddressTest, StructuredAddressTokens) {}

// Test that we properly match typed values to stored country data.
TEST_F(AddressTest, IsCountry) {}

// Verifies that Address::GetInfo() correctly combines address lines.
TEST_F(AddressTest, GetStreetAddress) {}

// Verifies that overwriting an address with N lines with one that has fewer
// than N lines does not result in an address with blank lines at the end.
TEST_F(AddressTest, GetStreetAddressAfterOverwritingLongAddressWithShorterOne) {}

// Verifies that Address::SetRawInfo() is able to split address lines correctly.
TEST_F(AddressTest, SetRawStreetAddress) {}

// Street addresses should be set properly.
TEST_F(AddressTest, SetStreetAddress) {}

// Verifies that Address::SetInfio() rejects setting data for
// ADDRESS_HOME_STREET_ADDRESS if the data has any interior blank lines.
TEST_F(AddressTest, SetStreetAddressRejectsAddressesWithInteriorBlankLines) {}

// Verifies that Address::SetInfio() rejects setting data for
// ADDRESS_HOME_STREET_ADDRESS if the data has any leading blank lines.
TEST_F(AddressTest, SetStreetAddressRejectsAddressesWithLeadingBlankLines) {}

// Verifies that Address::SetInfio() rejects setting data for
// ADDRESS_HOME_STREET_ADDRESS if the data has any trailing blank lines.
TEST_F(AddressTest, SetStreetAddressRejectsAddressesWithTrailingBlankLines) {}

// Verifies that the merging-related methods for structured addresses are
// implemented correctly. This is not a test of the merging logic itself.
TEST_F(AddressTest, TestMergeStructuredAddresses) {}

// Tests that if only one of the structured addresses in a merge operation has
// country information, it is used as their common country during comparison and
// for rewriting rules.
TEST_F(AddressTest, TestMergeStructuredAddressesMissingCountry) {}

// Tests the retrieval of the structured address.
TEST_F(AddressTest, TestGettingTheStructuredAddress) {}

// For structured address, test that the structured information is wiped
// correctly when the unstructured street address changes.
TEST_F(AddressTest, ResetStructuredTokens) {}

TEST_F(AddressTest, IsLegacyAddress) {}

TEST_F(AddressTest, IsLegacyAddressUpdateCountry) {}

TEST_F(AddressTest, TestUpdateLegacyToCustomHierarchy) {}

TEST_F(AddressTest, TestUpdateCustomHierarchyToLegacy) {}

TEST_F(AddressTest, TestSynthesizedNodesGeneration) {}

}  // namespace autofill