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

Unified Diff: chrome/browser/extensions/extension_apitest.cc

Issue 10912041: Disallow packing or loading unpacked manifest v1 extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blarh Created 8 years, 3 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/browser/extensions/extension_apitest.h ('k') | chrome/browser/extensions/extension_browsertest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_apitest.cc
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 86a048ad9a430cae7af98fa8c7a66cd91d1c8a57..c149d2bced960d77c6534108f5978aab90fdfdf0 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -124,7 +124,15 @@ bool ExtensionApiTest::RunExtensionTestIncognito(const char* extension_name) {
bool ExtensionApiTest::RunExtensionTestIgnoreManifestWarnings(
const char* extension_name) {
return RunExtensionTestImpl(
- extension_name, "", kFlagEnableFileAccess | kFlagIgnoreManifestWarnings);
+ extension_name, "", kFlagIgnoreManifestWarnings);
+}
+
+bool ExtensionApiTest::RunExtensionTestAllowOldManifestVersion(
+ const char* extension_name) {
+ return RunExtensionTestImpl(
+ extension_name,
+ "",
+ kFlagEnableFileAccess | kFlagAllowOldManifestVersions);
}
bool ExtensionApiTest::RunComponentExtensionTest(const char* extension_name) {
@@ -194,6 +202,10 @@ bool ExtensionApiTest::RunExtensionTestImpl(const char* extension_name,
browser_test_flags |= ExtensionBrowserTest::kFlagEnableFileAccess;
if (flags & kFlagIgnoreManifestWarnings)
browser_test_flags |= ExtensionBrowserTest::kFlagIgnoreManifestWarnings;
+ if (flags & kFlagAllowOldManifestVersions) {
+ browser_test_flags |=
+ ExtensionBrowserTest::kFlagAllowOldManifestVersions;
+ }
extension = LoadExtensionWithFlags(extension_path, browser_test_flags);
}
if (!extension) {
« no previous file with comments | « chrome/browser/extensions/extension_apitest.h ('k') | chrome/browser/extensions/extension_browsertest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698