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

#include <string>
#include <utility>

#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

ASCIIToUTF16;

namespace autofill {

// Test that the correct country code is returned for various locales.
TEST(CountryNamesForLocaleTest, GetCountryCode) {}

// Test that supplying an non-empty but invalid locale reverts back to 'en_US'
// localized names.
TEST(CountryNamesForLocaleTest, EmptyCountryCodeForInvalidLocale) {}

// The behavior depends on the platform. On Android the locale reverts back to
// the standard locale.
#if !BUILDFLAG(IS_ANDROID)
// TODO:(crbug.com/1456465) Re-enable test for iOS
// In iOS17, NSLocale's internal implementation was modified resulting in
// redefined behavior for existing functions. As a result,
// `l10n_util::GetDisplayNameForCountry` no longer produces the same output in
// iOS17 as previous versions.
#if BUILDFLAG(IS_IOS)
#define MAYBE_EmptyCountryCodeForEmptyLocale
#else
#define MAYBE_EmptyCountryCodeForEmptyLocale
#endif
// Test that an empty string is returned for an empty locale.
TEST(CountryNamesForLocaleTest, MAYBE_EmptyCountryCodeForEmptyLocale) {}
#endif

// Test that an empty string is returned for an empty country name.
TEST(CountryNamesForLocaleTest, EmptyCountryCodeForEmptyCountryName) {}

// Test that an empty string is returned for an invalid country name.
TEST(CountryNamesForLocaleTest, EmptyCountryCodeForInvalidCountryName) {}

// Test that an instance is correctly constructed using the move semantics.
TEST(CountryNamesForLocaleTest, MoveConstructior) {}

}  // namespace autofill