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 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "chrome/browser/extensions/extension_test_notification_observer.h" | 14 #include "chrome/browser/extensions/extension_test_notification_observer.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/common/extensions/features/feature_channel.h" | 17 #include "chrome/common/extensions/features/feature_channel.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "extensions/browser/extension_host.h" | 20 #include "extensions/browser/extension_host.h" |
21 #include "extensions/browser/extension_system.h" | 21 #include "extensions/browser/extension_system.h" |
22 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
23 #include "extensions/common/feature_switch.h" | 23 #include "extensions/common/feature_switch.h" |
24 #include "extensions/common/manifest.h" | 24 #include "extensions/common/manifest.h" |
25 | 25 |
26 class ExtensionService; | 26 class ExtensionService; |
27 class Profile; | 27 class Profile; |
28 | 28 |
29 namespace base { | |
30 class ScopedPathOverride; | |
31 } | |
32 | |
29 namespace extensions { | 33 namespace extensions { |
30 class ExtensionCacheFake; | 34 class ExtensionCacheFake; |
31 class ExtensionSet; | 35 class ExtensionSet; |
32 class ProcessManager; | 36 class ProcessManager; |
33 } | 37 } |
34 | 38 |
35 // Base class for extension browser tests. Provides utilities for loading, | 39 // Base class for extension browser tests. Provides utilities for loading, |
36 // unloading, and installing extensions. | 40 // unloading, and installing extensions. |
37 class ExtensionBrowserTest : virtual public InProcessBrowserTest { | 41 class ExtensionBrowserTest : virtual public InProcessBrowserTest { |
38 protected: | 42 protected: |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 bool wait_for_idle, | 372 bool wait_for_idle, |
369 bool is_ephemeral); | 373 bool is_ephemeral); |
370 | 374 |
371 // Make the current channel "dev" for the duration of the test. | 375 // Make the current channel "dev" for the duration of the test. |
372 extensions::ScopedCurrentChannel current_channel_; | 376 extensions::ScopedCurrentChannel current_channel_; |
373 | 377 |
374 // Disable external install UI. | 378 // Disable external install UI. |
375 extensions::FeatureSwitch::ScopedOverride | 379 extensions::FeatureSwitch::ScopedOverride |
376 override_prompt_for_external_extensions_; | 380 override_prompt_for_external_extensions_; |
377 | 381 |
382 // Use mock shortcut directories to ensure app shortcuts are cleaned up. | |
Yoyo Zhou
2014/09/15 18:54:55
This should probably be in a #if defined(OS_WIN) b
calamity
2014/09/16 00:56:21
Done.
| |
383 scoped_ptr<base::ScopedPathOverride> user_desktop_override_; | |
gab
2014/09/16 00:01:10
No need for scoped_ptr, a direct member is suffici
calamity
2014/09/16 00:56:21
Done.
| |
384 scoped_ptr<base::ScopedPathOverride> common_desktop_override_; | |
385 scoped_ptr<base::ScopedPathOverride> user_quick_launch_override_; | |
386 scoped_ptr<base::ScopedPathOverride> start_menu_override_; | |
387 scoped_ptr<base::ScopedPathOverride> common_start_menu_override_; | |
388 | |
378 // The default profile to be used. | 389 // The default profile to be used. |
379 Profile* profile_; | 390 Profile* profile_; |
380 | 391 |
381 // Cache cache implementation. | 392 // Cache cache implementation. |
382 scoped_ptr<extensions::ExtensionCacheFake> test_extension_cache_; | 393 scoped_ptr<extensions::ExtensionCacheFake> test_extension_cache_; |
383 }; | 394 }; |
384 | 395 |
385 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 396 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
OLD | NEW |