Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6648)

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 10086019: Use the non-localized "canonical name" of an extension to write to its sync (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rename, test Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 45ab26a9ebc646175375e76f49cbe0fcfa5c68b3..a08615b0a4ae47ff81a6d517b71d2a9bbfebf557 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -254,6 +254,7 @@ TEST_F(ExtensionManifestTest, InitFromValueValid) {
EXPECT_TRUE(Extension::IdIsValid(extension->id()));
EXPECT_EQ("1.0.0.0", extension->VersionString());
EXPECT_EQ("my extension", extension->name());
+ EXPECT_EQ("my extension", extension->non_localized_name());
EXPECT_EQ(extension->id(), extension->url().host());
EXPECT_EQ(extension->path(), path);
EXPECT_EQ(path, extension->path());
@@ -384,6 +385,8 @@ TEST_F(ExtensionManifestTest, InitFromValueValidNameInRTL) {
"init_valid_name_no_rtl.json"));
string16 localized_name(ASCIIToUTF16("Dictionary (by Google)"));
+ EXPECT_EQ(localized_name, UTF8ToUTF16(extension->non_localized_name()));
+
base::i18n::AdjustStringForLocaleDirection(&localized_name);
EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));
@@ -391,6 +394,8 @@ TEST_F(ExtensionManifestTest, InitFromValueValidNameInRTL) {
extension = LoadAndExpectSuccess("init_valid_name_strong_rtl.json");
localized_name = WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)");
+ EXPECT_EQ(localized_name, UTF8ToUTF16(extension->non_localized_name()));
+
base::i18n::AdjustStringForLocaleDirection(&localized_name);
EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698