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

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

Issue 9664053: Re-land 125247: Better error messages when using unsupported manifest features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/manifest.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/manifest_unittest.cc
diff --git a/chrome/common/extensions/manifest_unittest.cc b/chrome/common/extensions/manifest_unittest.cc
index 7ca6ac5153c76deb711e2872082bd29d40be0d18..0d4598297d5fb8ee3c344272093dccea5c6edc0d 100644
--- a/chrome/common/extensions/manifest_unittest.cc
+++ b/chrome/common/extensions/manifest_unittest.cc
@@ -72,8 +72,14 @@ TEST_F(ManifestTest, Extension) {
// Validate should also stop working.
error.clear();
EXPECT_FALSE(manifest->ValidateManifest(&error));
- EXPECT_EQ(ExtensionErrorUtils::FormatErrorMessageUTF16(
- errors::kFeatureNotAllowed, "background_page"), error);
+ {
+ Feature feature;
+ feature.set_max_manifest_version(1);
+ EXPECT_EQ(ExtensionErrorUtils::FormatErrorMessageUTF16(
+ errors::kFeatureNotAllowed,
+ "background_page",
+ feature.GetErrorMessage(Feature::INVALID_MAX_MANIFEST_VERSION)), error);
+ }
// Test DeepCopy and Equals.
scoped_ptr<Manifest> manifest2(manifest->DeepCopy());
« no previous file with comments | « chrome/common/extensions/manifest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698