diff options
Diffstat (limited to 'chrome/common/extensions/extension_l10n_util_unittest.cc')
-rw-r--r-- | chrome/common/extensions/extension_l10n_util_unittest.cc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/chrome/common/extensions/extension_l10n_util_unittest.cc b/chrome/common/extensions/extension_l10n_util_unittest.cc index 2825a4c..da46b78 100644 --- a/chrome/common/extensions/extension_l10n_util_unittest.cc +++ b/chrome/common/extensions/extension_l10n_util_unittest.cc @@ -193,39 +193,4 @@ TEST(ExtensionL10nUtil, GetParentLocales) { EXPECT_EQ("sr", locales[2]); } -bool PathsAreEqual(const FilePath& path1, const FilePath& path2) { - FilePath::StringType path1_str = path1.value(); - std::replace(path1_str.begin(), path1_str.end(), '\\', '/'); - - FilePath::StringType path2_str = path2.value(); - std::replace(path2_str.begin(), path2_str.end(), '\\', '/'); - - if (path1_str == path2_str) { - return true; - } else { - return false; - } -} - -TEST(ExtensionL10nUtil, GetL10nRelativePath) { - static std::string current_locale = - extension_l10n_util::NormalizeLocale(l10n_util::GetApplicationLocale(L"")); - - std::vector<FilePath> l10n_paths; - extension_l10n_util::GetL10nRelativePaths( - FilePath(FILE_PATH_LITERAL("foo/bar.js")), &l10n_paths); - ASSERT_FALSE(l10n_paths.empty()); - - std::vector<std::string> locales; - extension_l10n_util::GetParentLocales(current_locale, &locales); - ASSERT_EQ(locales.size(), l10n_paths.size()); - - for (size_t i = 0; i < locales.size(); ++i) { - FilePath tmp; - tmp = tmp.AppendASCII(Extension::kLocaleFolder) - .AppendASCII(locales[i]).AppendASCII("foo/bar.js"); - EXPECT_TRUE(PathsAreEqual(tmp, l10n_paths[i])); - } -} - } // namespace |