chromium/components/autofill/core/browser/data_model/autofill_structured_address_name_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_name.h"

#include <stddef.h>
#include <map>
#include <string>
#include <vector>

#include "base/feature_list.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.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/common/autofill_features.h"
#include "testing/gtest/include/gtest/gtest.h"

ASCIIToUTF16;

namespace autofill {

AddressComponentTestValues;

namespace {

// A test record that contains all entries of the hybrid-structure name tree.
struct NameParserTestRecord {};

// A test record that contains all entries of the hybrid-structure last name
// tree.
struct LastNameParserTestRecord {};

// Function to test the parsing of a name from the full (unstructured)
// representation into its subcomponents.
void TestNameParsing(const std::u16string& full,
                     const std::u16string& first,
                     const std::u16string& middle,
                     const std::u16string& last,
                     const std::u16string& last_first,
                     const std::u16string& last_conjunction,
                     const std::u16string& last_second) {}

// Testing function for parsing a |NAME_LAST| into its subcomponents.
void TestLastNameParsing(const std::u16string& last_name,
                         const std::u16string& target_first,
                         const std::u16string& target_conjunction,
                         const std::u16string& target_second) {}

}  // namespace

// Tests the parsing of last names into their tree components:
// * The first part, that is only used in Latinx/Hispanic names.
// * The conjunction, that is optional in Latinx/Hispanic names.
// * The second part, for Latinx/Hispanic and all other last names.
TEST(AutofillStructuredName, ParseLastName) {}

// Tests the parsing of full names into their subcomponents.
TEST(AutofillStructuredName, ParseFullName) {}

// Tests the detection of CJK name characteristics.
TEST(AutofillStructuredName, HasCjkNameCharacteristics) {}

// Test the detection of Hispanic/Latinx name characteristics.
TEST(AutofillStructuredName, HasHispanicLatinxNameCharacteristics) {}

// Test the detection of middle name initials.
TEST(AutofillStructuredName, HasMiddleNameInitialsCharacteristics) {}

// Test the reduction of a name to its initials.
TEST(AutofillStructuredName, ReduceToInitials) {}

// Test getting the field type |NAME_MIDDLE_INITIAL|.
TEST(AutofillStructuredName, GetNameMiddleInitial) {}

TEST(AutofillStructuredName, TestGetSupportedTypes_FullName) {}

TEST(AutofillStructuredName, TestSettingMiddleNameInitial) {}

TEST(AutofillStructuredName, MergePermutedNames) {}

// Tests that the root node of NameFull is correctly populated after a
// migration from a NameFull structure.
TEST(AutofillStructuredName, TestPopulationOfNameFull) {}

TEST(AutofillStructuredName,
     MergeNamesByCombiningSubstructureObservations_FullName) {}

TEST(AutofillStructuredName, TestCopyConstructor) {}

TEST(AutofillStructuredName,
     MigrationFromLegacyStructure_WithFullName_Unverified) {}

TEST(AutofillStructuredName, MigrationFromLegacyStructure_WithoutFullName) {}

TEST(AutofillStructuredName, MergeSubsetLastname) {}

TEST(AutofillStructuredName, MergeSubsetLastname_WithNonSpaceSeparators) {}

TEST(AutofillStructuredName, MergeSubsetLastname2) {}

}  // namespace autofill