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 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_util.h" | 11 #include "chrome/browser/extensions/extension_util.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/browser_commands.h" | 13 #include "chrome/browser/ui/browser_commands.h" |
14 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
15 #include "content/public/test/test_utils.h" | 15 #include "content/public/test/test_utils.h" |
16 #include "extensions/browser/extension_registry.h" | 16 #include "extensions/browser/extension_registry.h" |
17 #include "extensions/browser/extension_system.h" | 17 #include "extensions/browser/extension_system.h" |
| 18 #include "extensions/browser/extension_util.h" |
18 #include "extensions/browser/notification_types.h" | 19 #include "extensions/browser/notification_types.h" |
19 #include "extensions/browser/test_extension_registry_observer.h" | 20 #include "extensions/browser/test_extension_registry_observer.h" |
20 | 21 |
21 namespace extensions { | 22 namespace extensions { |
22 | 23 |
23 class ExtensionFunctionalTest : public ExtensionBrowserTest { | 24 class ExtensionFunctionalTest : public ExtensionBrowserTest { |
24 public: | 25 public: |
25 void InstallExtensionSilently(ExtensionService* service, | 26 void InstallExtensionSilently(ExtensionService* service, |
26 const char* filename) { | 27 const char* filename) { |
27 ExtensionRegistry* registry = ExtensionRegistry::Get(profile()); | 28 ExtensionRegistry* registry = ExtensionRegistry::Get(profile()); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), true); | 101 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), true); |
101 EXPECT_TRUE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); | 102 EXPECT_TRUE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); |
102 | 103 |
103 // Disallow extension in incognito mode and verify. | 104 // Disallow extension in incognito mode and verify. |
104 service->EnableExtension(last_loaded_extension_id()); | 105 service->EnableExtension(last_loaded_extension_id()); |
105 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false); | 106 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false); |
106 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); | 107 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); |
107 } | 108 } |
108 | 109 |
109 } // namespace extensions | 110 } // namespace extensions |
OLD | NEW |