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