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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/scoped_temp_dir.h" | 13 #include "base/scoped_temp_dir.h" |
14 #include "chrome/browser/extensions/extension_host.h" | 14 #include "chrome/browser/extensions/extension_host.h" |
15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
| 16 #include "chrome/common/extensions/features/feature.h" |
16 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
17 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
18 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_types.h" | 20 #include "content/public/browser/notification_types.h" |
20 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
21 | 22 |
22 // Base class for extension browser tests. Provides utilities for loading, | 23 // Base class for extension browser tests. Provides utilities for loading, |
23 // unloading, and installing extensions. | 24 // unloading, and installing extensions. |
24 class ExtensionBrowserTest : virtual public InProcessBrowserTest, | 25 class ExtensionBrowserTest : virtual public InProcessBrowserTest, |
25 public content::NotificationObserver { | 26 public content::NotificationObserver { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 222 |
222 bool WaitForExtensionViewsToLoad(); | 223 bool WaitForExtensionViewsToLoad(); |
223 | 224 |
224 // When waiting for page action count to change, we wait until it reaches this | 225 // When waiting for page action count to change, we wait until it reaches this |
225 // value. | 226 // value. |
226 int target_page_action_count_; | 227 int target_page_action_count_; |
227 | 228 |
228 // When waiting for visible page action count to change, we wait until it | 229 // When waiting for visible page action count to change, we wait until it |
229 // reaches this value. | 230 // reaches this value. |
230 int target_visible_page_action_count_; | 231 int target_visible_page_action_count_; |
| 232 |
| 233 // Ensure there is a channel set for the duration of the test. |
| 234 extensions::Feature::ScopedCurrentChannel current_channel_; |
231 }; | 235 }; |
232 | 236 |
233 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 237 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
OLD | NEW |