#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) { … }
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) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestEmptyManifest) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithDefaultLocale) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithCurrentLocale) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocale) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestDifferentCurrentLocale) { … }
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocaleAsPreferred) { … }
TEST(ExtensionL10nUtil,
ShouldRelocalizeManifestDifferentCurrentLocaleThanPreferred) { … }
TEST(ExtensionL10nUtil, GetAllFallbackLocales) { … }
TEST(ExtensionL10nUtil, GetAllFallbackLocalesWithPreferredLocale) { … }
}
}