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

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

Issue 9737001: Fix crash in AppNotifyChannelSetup when incognito profiles are used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback + test failures 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
Index: chrome/browser/extensions/extension_apitest.h
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index 1d4d43a5fcbaa164d9cb37a4f921522339f02587..94393c77bea598609164b8de822bb89caa640632 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -32,6 +32,26 @@ class FilePath;
class ExtensionApiTest : public ExtensionBrowserTest {
public:
+ // Flags used to configure how the tests are run.
+ enum Flags {
+ kFlagNone = 0,
+
+ // Allow the extension to run in incognito mode.
+ kFlagEnableIncognito = 1 << 0,
+
+ // Launch the test page in an incognito window.
+ kFlagUseIncognito = 1 << 1,
+
+ // Allow file access for the extension.
+ kFlagEnableFileAccess = 1 << 2,
+
+ // Loads the extension with location COMPONENT.
+ kFlagLoadAsComponent = 1 << 3,
+
+ // Launch the extension in a platform app shell.
+ kFlagLaunchAppShell = 1 << 4
+ };
+
ExtensionApiTest();
virtual ~ExtensionApiTest();
@@ -103,21 +123,10 @@ class ExtensionApiTest : public ExtensionBrowserTest {
bool RunExtensionSubtest(const char* extension_name,
const std::string& page_url);
- // Same as RunExtensionSubtest, but loads extension as component.
- bool RunComponentExtensionSubtest(const char* extension_name,
- const std::string& page_url);
-
- // Same as RunExtensionSubtest, but disables file access.
- bool RunExtensionSubtestNoFileAccess(const char* extension_name,
- const std::string& page_url);
-
- // Same as RunExtensionSubtest, but enables the extension for incognito mode.
- bool RunExtensionSubtestIncognito(const char* extension_name,
- const std::string& page_url);
-
- // Same as RunExtensionSubtestIncognito, but disables file access.
- bool RunExtensionSubtestIncognitoNoFileAccess(const char* extension_name,
- const std::string& page_url);
+ // Same as RunExtensionSubtest, except run with the specific |flags|.
+ bool RunExtensionSubtest(const char* extension_name,
+ const std::string& page_url,
+ int flags);
// Load |page_url| and wait for pass / fail notification from the extension
// API on the page.
@@ -147,13 +156,6 @@ class ExtensionApiTest : public ExtensionBrowserTest {
std::string message_;
private:
- enum Flags {
- kFlagNone = 0,
- kFlagEnableIncognito = 1 << 0,
- kFlagEnableFileAccess = 1 << 1,
- kFlagLoadAsComponent = 1 << 2,
- kFlagLaunchAppShell = 1 << 3
- };
bool RunExtensionTestImpl(const char* extension_name,
const std::string& test_page,
int flags);
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_setup.cc ('k') | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698