#include <stddef.h>
#include <map>
#include <memory>
#include <vector>
#include "base/feature_list.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/no_destructor.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/address_data_manager.h"
#include "components/autofill/core/browser/address_data_manager_test_api.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/form_data_importer.h"
#include "components/autofill/core/browser/form_data_importer_test_api.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_data_test_api.h"
#include "testing/data_driven_testing/data_driven_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#if BUILDFLAG(IS_APPLE)
#include "base/apple/foundation_util.h"
#endif
namespace autofill {
namespace {
const base::FilePath::CharType kFeatureName[] = …);
const base::FilePath::CharType kTestName[] = …);
const base::FilePath::CharType kFileNamePattern[] = …);
const char kFieldSeparator[] = …;
const char kProfileSeparator[] = …;
const FieldType kProfileFieldTypes[] = …;
const base::FilePath& GetTestDataDir() { … }
const std::vector<base::FilePath> GetTestFiles() { … }
std::string SerializeProfiles(
const std::vector<const AutofillProfile*>& profiles) { … }
}
class AutofillMergeTest : public testing::DataDrivenTest,
public testing::TestWithParam<base::FilePath> { … };
AutofillMergeTest::AutofillMergeTest()
: … { … }
AutofillMergeTest::~AutofillMergeTest() = default;
void AutofillMergeTest::SetUp() { … }
void AutofillMergeTest::TearDown() { … }
void AutofillMergeTest::GenerateResults(const std::string& input,
std::string* output) { … }
void AutofillMergeTest::MergeProfiles(const std::string& profiles,
std::string* merged_profiles) { … }
TEST_P(AutofillMergeTest, DataDrivenMergeProfiles) { … }
INSTANTIATE_TEST_SUITE_P(…);
}