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

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

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
Index: chrome/browser/extensions/extension_apitest.h
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index b5f7e3e3646227ed1cf32bbb6faba689ee673fc8..a92345597ad854058fefc2c10d951bc743f3af47 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -32,10 +32,11 @@ class Extension;
// chrome.test.fail
// (4) Verify expected browser state.
// TODO(erikkay): There should also be a way to drive events in these tests.
-
class ExtensionApiTest : public ExtensionBrowserTest {
public:
// Flags used to configure how the tests are run.
+ // TODO(aa): Many of these are dupes of ExtensionBrowserTest::Flags. Combine
+ // somehow?
enum Flags {
kFlagNone = 0,
@@ -54,9 +55,12 @@ class ExtensionApiTest : public ExtensionBrowserTest {
// Launch the extension as a platform app.
kFlagLaunchPlatformApp = 1 << 4,
- // Don't fail when the loaded manifest has warnings (should only be used
- // when testing deprecated features).
- kFlagIgnoreManifestWarnings = 1 << 5
+ // Don't fail when the loaded manifest has warnings.
+ kFlagIgnoreManifestWarnings = 1 << 5,
+
+ // Allow manifest versions older that Extension::kModernManifestVersion.
+ // Used to test old manifest features.
+ kFlagAllowOldManifestVersions = 1 << 6,
};
ExtensionApiTest();
@@ -116,6 +120,9 @@ class ExtensionApiTest : public ExtensionBrowserTest {
// Same as RunExtensionTest, but ignores any warnings in the manifest.
bool RunExtensionTestIgnoreManifestWarnings(const char* extension_name);
+ // Same as RunExtensionTest, allow old manifest ersions.
+ bool RunExtensionTestAllowOldManifestVersion(const char* extension_name);
+
// Same as RunExtensionTest, but loads extension as component.
bool RunComponentExtensionTest(const char* extension_name);
« no previous file with comments | « chrome/browser/extensions/api/extension_action/page_action_apitest.cc ('k') | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698