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

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

Issue 10536084: Add a warning when developing an extension that uses old manifest version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blonk Created 8 years, 6 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_file_util.cc ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_file_util_unittest.cc
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index f6769ba010dd0cee809dfc781715ef46a8f38f77..5551db146e1fa68c382723868828085db8de9cfc 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -383,7 +383,7 @@ TEST(ExtensionFileUtil, ValidateThemeUTF8) {
kManifest, temp.path(), Extension::LOAD, 0, &error);
ASSERT_TRUE(extension.get()) << error;
- std::vector<std::string> warnings;
+ Extension::InstallWarningVector warnings;
EXPECT_TRUE(extension_file_util::ValidateExtension(extension,
&error, &warnings)) <<
error;
@@ -410,7 +410,7 @@ TEST(ExtensionFileUtil, MAYBE_BackgroundScriptsMustExist) {
value->Set("background.scripts", scripts);
std::string error;
- std::vector<std::string> warnings;
+ Extension::InstallWarningVector warnings;
scoped_refptr<Extension> extension = LoadExtensionManifest(
value.get(), temp.path(), Extension::LOAD, 0, &error);
ASSERT_TRUE(extension.get()) << error;
@@ -509,10 +509,14 @@ TEST(ExtensionFileUtil, WarnOnPrivateKey) {
ext_path, "the_id", Extension::EXTERNAL_PREF,
Extension::NO_FLAGS, &error));
ASSERT_TRUE(extension.get()) << error;
- EXPECT_THAT(extension->install_warnings(),
- testing::ElementsAre(
- testing::ContainsRegex(
- "extension includes the key file.*ext_root.a_key.pem")));
+ ASSERT_EQ(1u, extension->install_warnings().size());
+ EXPECT_THAT(
+ extension->install_warnings(),
+ testing::ElementsAre(
+ testing::Field(
+ &Extension::InstallWarning::message,
+ testing::ContainsRegex(
+ "extension includes the key file.*ext_root.a_key.pem"))));
// Turn the warning into an error with ERROR_ON_PRIVATE_KEY.
extension = extension_file_util::LoadExtension(
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698