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/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_install_ui.h" | 7 #include "chrome/browser/extensions/extension_install_ui.h" |
8 #include "chrome/browser/extensions/extensions_service.h" | 8 #include "chrome/browser/extensions/extensions_service.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.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 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) { | 67 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) { |
68 // A regular extension should give no prompt. | 68 // A regular extension should give no prompt. |
69 EXPECT_FALSE(DidWhitelistInstallPrompt("good.crx", | 69 EXPECT_FALSE(DidWhitelistInstallPrompt("good.crx", |
70 "ldnnhddmnhbkjipkidpdiheffobcpfmf")); | 70 "ldnnhddmnhbkjipkidpdiheffobcpfmf")); |
71 #if !defined(OS_CHROMEOS) | 71 #if !defined(OS_CHROMEOS) |
72 // An extension with NPAPI should give a prompt. | 72 // An extension with NPAPI should give a prompt. |
73 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx", | 73 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx", |
74 "hdgllgikmikobbofgnabhfimcfoopgnd")); | 74 "hdgllgikmikobbofgnabhfimcfoopgnd")); |
75 #endif // !defined(OS_CHROMEOS) | 75 #endif // !defined(OS_CHROMEOS) |
76 } | 76 } |
OLD | NEW |