Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: chrome/browser/extensions/crx_installer_browsertest.cc

Issue 7003100: Merge 88204 - Partially deprecate the old webstorePrivate.beginInstall method (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 FilePath crx_path = test_data_dir_.AppendASCII(crx_relpath); 61 FilePath crx_path = test_data_dir_.AppendASCII(crx_relpath);
62 installer->InstallCrx(crx_path); 62 installer->InstallCrx(crx_path);
63 ui_test_utils::RunMessageLoop(); 63 ui_test_utils::RunMessageLoop();
64 64
65 return mock_install_ui->confirmation_requested(); 65 return mock_install_ui->confirmation_requested();
66 } 66 }
67 }; 67 };
68 68
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 // We're deprecating this whitelist mechanism, but right now we just assert
71 EXPECT_FALSE(DidWhitelistInstallPrompt("good.crx", 71 // that it actually did prompt.
72 "ldnnhddmnhbkjipkidpdiheffobcpfmf")); 72 EXPECT_TRUE(DidWhitelistInstallPrompt("good.crx",
73 "ldnnhddmnhbkjipkidpdiheffobcpfmf"));
73 #if !defined(OS_CHROMEOS) 74 #if !defined(OS_CHROMEOS)
74 // An extension with NPAPI should give a prompt. 75 // An extension with NPAPI should give a prompt.
75 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx", 76 EXPECT_TRUE(DidWhitelistInstallPrompt("uitest/plugins.crx",
76 "hdgllgikmikobbofgnabhfimcfoopgnd")); 77 "hdgllgikmikobbofgnabhfimcfoopgnd"));
77 #endif // !defined(OS_CHROMEOS) 78 #endif // !defined(OS_CHROMEOS)
78 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_gallery_install_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698