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

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

Issue 714133002: Add more management policy checking after extension installed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove two tests Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_disabled_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index 9b5a4d9d6a0c1371b3affc1f41f67f4be74e663c..90284c073b3de601857b4e14d3e6910b01fc21be 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -153,45 +153,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, UserDisabled) {
ASSERT_FALSE(GetExtensionDisabledGlobalError());
}
-// Test that no error appears if the disable reason is unknown
-// (but probably was by the user).
-IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
- UnknownReasonSamePermissions) {
- const Extension* extension = InstallIncreasingPermissionExtensionV1();
- DisableExtension(extension->id());
- // Clear disable reason to simulate legacy disables.
- ExtensionPrefs::Get(browser()->profile())
- ->ClearDisableReasons(extension->id());
- // Upgrade to version 2. Infer from version 1 having the same permissions
- // granted by the user that it was disabled by the user.
- extension = UpdateIncreasingPermissionExtension(extension, path_v2_, 0);
- ASSERT_TRUE(extension);
- ASSERT_FALSE(GetExtensionDisabledGlobalError());
-}
-
-// Test that an error appears if the disable reason is unknown
-// (but probably was for increased permissions).
-IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
- UnknownReasonHigherPermissions) {
- const Extension* extension = InstallAndUpdateIncreasingPermissionsExtension();
- // Clear disable reason to simulate legacy disables.
- ExtensionPrefs::Get(service_->profile())
- ->ClearDisableReasons(extension->id());
- // We now have version 2 but only accepted permissions for version 1.
- GlobalError* error = GetExtensionDisabledGlobalError();
- ASSERT_TRUE(error);
- // Also, remove the upgrade error for version 2.
- GlobalErrorServiceFactory::GetForProfile(browser()->profile())->
- RemoveGlobalError(error);
- delete error;
- // Upgrade to version 3, with even higher permissions. Infer from
- // version 2 having higher-than-granted permissions that it was disabled
- // for permissions increase.
- extension = UpdateIncreasingPermissionExtension(extension, path_v3_, 0);
- ASSERT_TRUE(extension);
- ASSERT_TRUE(GetExtensionDisabledGlobalError());
-}
-
// Test that an error appears if the extension gets disabled because a
// version with higher permissions was installed by sync.
IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698