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

Unified Diff: chrome/browser/extensions/extension_management_browsertest.cc

Issue 7003098: Start refractoring extension permissions into ExtensionPermissionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: See if rebasing fixes the tests... 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_management_browsertest.cc
diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc
index d80f37c1910fa91bbf9a4739d03c9c909c9166aa..e7f800463c9c92e84c0409ad8a96f882be273203 100644
--- a/chrome/browser/extensions/extension_management_browsertest.cc
+++ b/chrome/browser/extensions/extension_management_browsertest.cc
@@ -124,6 +124,18 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallThenCancel) {
"1.0"));
}
+IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallRequiresConfirm) {
+ // Installing the extension without an auto confirming UI should fail
+ // since good.crx has permissions that require approval.
+ ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 0));
+ UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf");
+
+ // And the install should succeed when the permissions are accepted.
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(
+ test_data_dir_.AppendASCII("good.crx"), 1, browser()->profile()));
+ UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf");
+}
+
// Tests that installing and uninstalling extensions don't crash with an
// incognito window open.
IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, Incognito) {
@@ -133,7 +145,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, Incognito) {
ui_test_utils::OpenURLOffTheRecord(browser()->profile(),
GURL(chrome::kChromeUIExtensionsURL));
- ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 1));
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(
+ test_data_dir_.AppendASCII("good.crx"), 1, browser()->profile()));
UninstallExtension("ldnnhddmnhbkjipkidpdiheffobcpfmf");
}
« no previous file with comments | « chrome/browser/extensions/extension_management_api.cc ('k') | chrome/browser/extensions/extension_preference_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698