chromium/extensions/common/extension_l10n_util_unittest.cc

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

#include "extensions/common/extension_l10n_util.h"

#include <memory>

#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_reader.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension_paths.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/message_bundle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/google/compression_utils.h"
#include "ui/base/l10n/l10n_util.h"

GzippedMessagesPermission;

namespace extensions {

errors;
keys;

namespace {

TEST(ExtensionL10nUtil, ValidateLocalesWithBadLocale) {}

TEST(ExtensionL10nUtil, ValidateLocalesWithErroneousLocalizations) {}

TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) {}

TEST(ExtensionL10nUtil, GetValidLocalesWithValidLocaleNoMessagesFile) {}

TEST(ExtensionL10nUtil, GetValidLocalesWithUnsupportedLocale) {}

TEST(ExtensionL10nUtil, GetValidLocalesWithValidLocalesAndMessagesFile) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsValidFallback) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsLowercaseLocales) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsMissingFiles) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsBadJSONFormat) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsDuplicateKeys) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsWithUndefinedVariable) {}

TEST(ExtensionL10nUtil, LoadMessageCatalogsCompressed) {}

// Caller owns the returned object.
MessageBundle* CreateManifestBundle() {}

TEST(ExtensionL10nUtil, LocalizeEmptyManifest) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithoutNameMsgAndEmptyDescription) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithNameMsgAndEmptyDescription) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithLocalLaunchURL) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithHostedLaunchURL) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithBadNameMsg) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionDefaultTitleMsgs) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionOmniboxMsgs) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionFileHandlerTitle) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionCommandDescription) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithShortName) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithBadShortName) {}

TEST(ExtensionL10nUtil, LocalizeManifestWithSearchProviderMsgs) {}

// Tests that we don't relocalize with default and current locales missing.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestEmptyManifest) {}

// Tests that we relocalize without a current locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithDefaultLocale) {}

// Tests that we don't relocalize without a default locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithCurrentLocale) {}

// Tests that we don't relocalize with same current_locale as system locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocale) {}

// Tests that we relocalize with a different current_locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestDifferentCurrentLocale) {}

// Tests that we don't relocalize with the same current_locale as preferred
// locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocaleAsPreferred) {}

// Tests that we relocalize with a different current_locale from the preferred
// locale.
TEST(ExtensionL10nUtil,
     ShouldRelocalizeManifestDifferentCurrentLocaleThanPreferred) {}

TEST(ExtensionL10nUtil, GetAllFallbackLocales) {}

TEST(ExtensionL10nUtil, GetAllFallbackLocalesWithPreferredLocale) {}

}  // namespace
}  // namespace extensions