chromium/components/autofill/core/browser/geo/alternative_state_name_map_updater_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/geo/alternative_state_name_map_updater.h"

#include <optional>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/country_type.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/browser/geo/mock_alternative_state_name_map_updater.h"
#include "components/autofill/core/browser/test_address_data_manager.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

ASCIIToUTF16;
UTF8ToUTF16;

namespace i18n::addressinput {

operator<<;

}  // namespace i18n::addressinput

namespace autofill {

class AlternativeStateNameMapUpdaterTest : public ::testing::Test {};

// Tests that the states data is added to AlternativeStateNameMap.
TEST_F(AlternativeStateNameMapUpdaterTest, EntryAddedToStateMap) {}

// Tests that the AlternativeStateNameMap is populated when
// |StateNameMapUpdater::LoadStatesData()| is called.
TEST_F(AlternativeStateNameMapUpdaterTest, TestLoadStatesData) {}

// Tests that there is no insertion in the AlternativeStateNameMap when a
// garbage country code is supplied to the LoadStatesData for which the states
// data file does not exist.
TEST_F(AlternativeStateNameMapUpdaterTest, NoTaskIsPosted) {}

// Tests that the AlternativeStateNameMap is populated when
// |StateNameMapUpdater::LoadStatesData()| is called and there are UTF8 strings.
TEST_F(AlternativeStateNameMapUpdaterTest, TestLoadStatesDataUTF8) {}

// Tests that the AlternativeStateNameMap is populated when
// |StateNameMapUpdater::LoadStatesData()| is called for states data of
// multiple countries simultaneously.
TEST_F(AlternativeStateNameMapUpdaterTest,
       TestLoadStatesDataOfMultipleCountriesSimultaneously) {}

// Tests the |StateNameMapUpdater::ContainsState()| functionality.
TEST_F(AlternativeStateNameMapUpdaterTest, ContainsState) {}

// Tests that the |AlternativeStateNameMap| is populated with the help of the
// |MockAlternativeStateNameMapUpdater| observer when a new profile is added to
// the PDM.
TEST_F(AlternativeStateNameMapUpdaterTest,
       PopulateAlternativeStateNameUsingObserver) {}

}  // namespace autofill