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

Side by Side Diff: chrome/browser/extensions/extension_apitest.h

Issue 10826157: Check for warnings when loading extensions in browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ExtensionTerminalPrivateApiTest.TerminalTest Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Launch the test page in an incognito window. 45 // Launch the test page in an incognito window.
46 kFlagUseIncognito = 1 << 1, 46 kFlagUseIncognito = 1 << 1,
47 47
48 // Allow file access for the extension. 48 // Allow file access for the extension.
49 kFlagEnableFileAccess = 1 << 2, 49 kFlagEnableFileAccess = 1 << 2,
50 50
51 // Loads the extension with location COMPONENT. 51 // Loads the extension with location COMPONENT.
52 kFlagLoadAsComponent = 1 << 3, 52 kFlagLoadAsComponent = 1 << 3,
53 53
54 // Launch the extension as a platform app. 54 // Launch the extension as a platform app.
55 kFlagLaunchPlatformApp = 1 << 4 55 kFlagLaunchPlatformApp = 1 << 4,
56
57 // Don't fail when the loaded manifest has warnings (should only be used
58 // when testing deprecated features).
59 kFlagIgnoreManifestWarnings = 1 << 5
56 }; 60 };
57 61
58 ExtensionApiTest(); 62 ExtensionApiTest();
59 virtual ~ExtensionApiTest(); 63 virtual ~ExtensionApiTest();
60 64
61 protected: 65 protected:
62 // Helper class that observes tests failing or passing. Observation starts 66 // Helper class that observes tests failing or passing. Observation starts
63 // when the class is constructed. Get the next result by calling 67 // when the class is constructed. Get the next result by calling
64 // GetNextResult() and message() if GetNextResult() return false. If there 68 // GetNextResult() and message() if GetNextResult() return false. If there
65 // are no results, this method will pump the UI message loop until one is 69 // are no results, this method will pump the UI message loop until one is
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; 106 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
103 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; 107 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE;
104 108
105 // Load |extension_name| and wait for pass / fail notification. 109 // Load |extension_name| and wait for pass / fail notification.
106 // |extension_name| is a directory in "test/data/extensions/api_test". 110 // |extension_name| is a directory in "test/data/extensions/api_test".
107 bool RunExtensionTest(const char* extension_name); 111 bool RunExtensionTest(const char* extension_name);
108 112
109 // Same as RunExtensionTest, but enables the extension for incognito mode. 113 // Same as RunExtensionTest, but enables the extension for incognito mode.
110 bool RunExtensionTestIncognito(const char* extension_name); 114 bool RunExtensionTestIncognito(const char* extension_name);
111 115
116 // Same as RunExtensionTest, but ignores any warnings in the manifest.
117 bool RunExtensionTestIgnoreManifestWarnings(const char* extension_name);
118
112 // Same as RunExtensionTest, but loads extension as component. 119 // Same as RunExtensionTest, but loads extension as component.
113 bool RunComponentExtensionTest(const char* extension_name); 120 bool RunComponentExtensionTest(const char* extension_name);
114 121
115 // Same as RunExtensionTest, but disables file access. 122 // Same as RunExtensionTest, but disables file access.
116 bool RunExtensionTestNoFileAccess(const char* extension_name); 123 bool RunExtensionTestNoFileAccess(const char* extension_name);
117 124
118 // Same as RunExtensionTestIncognito, but disables file access. 125 // Same as RunExtensionTestIncognito, but disables file access.
119 bool RunExtensionTestIncognitoNoFileAccess(const char* extension_name); 126 bool RunExtensionTestIncognitoNoFileAccess(const char* extension_name);
120 127
121 // If not empty, Load |extension_name|, load |page_url| and wait for pass / 128 // If not empty, Load |extension_name|, load |page_url| and wait for pass /
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // apps (if any). 184 // apps (if any).
178 class PlatformAppApiTest : public ExtensionApiTest { 185 class PlatformAppApiTest : public ExtensionApiTest {
179 public: 186 public:
180 PlatformAppApiTest(); 187 PlatformAppApiTest();
181 virtual ~PlatformAppApiTest(); 188 virtual ~PlatformAppApiTest();
182 189
183 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; 190 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
184 }; 191 };
185 192
186 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ 193 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_apitest.cc ('k') | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698