OLD | NEW |
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_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/scoped_temp_dir.h" | 14 #include "base/scoped_temp_dir.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "content/public/browser/notification_details.h" | 16 #include "content/public/browser/notification_details.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
19 | 19 |
20 class Extension; | 20 class Extension; |
21 | 21 |
22 // Base class for extension browser tests. Provides utilities for loading, | 22 // Base class for extension browser tests. Provides utilities for loading, |
23 // unloading, and installing extensions. | 23 // unloading, and installing extensions. |
24 class ExtensionBrowserTest | 24 class ExtensionBrowserTest |
25 : public InProcessBrowserTest, public content::NotificationObserver { | 25 : public InProcessBrowserTest, public content::NotificationObserver { |
26 protected: | 26 protected: |
27 ExtensionBrowserTest(); | 27 ExtensionBrowserTest(); |
28 virtual ~ExtensionBrowserTest(); | 28 virtual ~ExtensionBrowserTest(); |
29 | 29 |
| 30 // InProcessBrowserTest |
30 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 31 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
31 | 32 |
32 const Extension* LoadExtension(const FilePath& path); | 33 const Extension* LoadExtension(const FilePath& path); |
33 | 34 |
34 // Same as above, but enables the extension in incognito mode first. | 35 // Same as above, but enables the extension in incognito mode first. |
35 const Extension* LoadExtensionIncognito(const FilePath& path); | 36 const Extension* LoadExtensionIncognito(const FilePath& path); |
36 | 37 |
37 const Extension* LoadExtensionWithOptions(const FilePath& path, | 38 const Extension* LoadExtensionWithOptions(const FilePath& path, |
38 bool incognito_enabled, | 39 bool incognito_enabled, |
39 bool fileaccess_enabled); | 40 bool fileaccess_enabled); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // When waiting for page action count to change, we wait until it reaches this | 173 // When waiting for page action count to change, we wait until it reaches this |
173 // value. | 174 // value. |
174 int target_page_action_count_; | 175 int target_page_action_count_; |
175 | 176 |
176 // When waiting for visible page action count to change, we wait until it | 177 // When waiting for visible page action count to change, we wait until it |
177 // reaches this value. | 178 // reaches this value. |
178 int target_visible_page_action_count_; | 179 int target_visible_page_action_count_; |
179 }; | 180 }; |
180 | 181 |
181 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 182 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
OLD | NEW |