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

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

Issue 170015: This change enables Chrome to load locale information for the extension. It d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
Index: chrome/common/extensions/extension_unittest.cc
===================================================================
--- chrome/common/extensions/extension_unittest.cc (revision 23230)
+++ chrome/common/extensions/extension_unittest.cc (working copy)
@@ -216,6 +216,12 @@
permissions->Set(0, Value::CreateStringValue("file:///C:/foo.txt"));
EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidPermissionScheme));
+
+ // Test invalid default locale.
+ input_value.reset(static_cast<DictionaryValue*>(valid_value->DeepCopy()));
+ input_value->SetInteger(keys::kDefaultLocale, 42);
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_EQ(errors::kInvalidDefaultLocale, error);
}
TEST(ExtensionTest, InitFromValueValid) {
« chrome/common/extensions/extension.cc ('K') | « chrome/common/extensions/extension_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698