| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | |
| 6 #include "chrome/browser/extensions/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
| 7 #include "chrome/browser/extensions/extension_browsertest.h" | 6 #include "chrome/browser/extensions/extension_browsertest.h" |
| 8 #include "chrome/browser/extensions/extension_install_ui.h" | 7 #include "chrome/browser/extensions/extension_install_ui.h" |
| 9 #include "chrome/browser/extensions/extensions_service.h" | 8 #include "chrome/browser/extensions/extensions_service.h" |
| 10 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 class MockInstallUI : public ExtensionInstallUI { | 15 class MockInstallUI : public ExtensionInstallUI { |
| 16 public: | 16 public: |
| 17 explicit MockInstallUI(Profile* profile) : | 17 explicit MockInstallUI(Profile* profile) : |
| 18 ExtensionInstallUI(profile), confirmation_requested_(false) {} | 18 ExtensionInstallUI(profile), confirmation_requested_(false) {} |
| 19 | 19 |
| 20 // Did the Delegate request confirmation? | 20 // Did the Delegate request confirmation? |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) { | 69 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) { |
| 70 // A regular extension should give no prompt. | 70 // A regular extension should give no prompt. |
| 71 EXPECT_FALSE(DidWhitelistInstallPrompt("good.crx", | 71 EXPECT_FALSE(DidWhitelistInstallPrompt("good.crx", |
| 72 "ldnnhddmnhbkjipkidpdiheffobcpfmf")); | 72 "ldnnhddmnhbkjipkidpdiheffobcpfmf")); |
| 73 #if !defined(OS_CHROMEOS) | 73 #if !defined(OS_CHROMEOS) |
| 74 // An extension with NPAPI should give a prompt. | 74 // An extension with NPAPI should give a prompt. |
| 75 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx", | 75 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx", |
| 76 "hdgllgikmikobbofgnabhfimcfoopgnd")); | 76 "hdgllgikmikobbofgnabhfimcfoopgnd")); |
| 77 #endif // !defined(OS_CHROMEOS) | 77 #endif // !defined(OS_CHROMEOS) |
| 78 } | 78 } |
| OLD | NEW |