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

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

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comments. Created 7 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
Index: chrome/browser/extensions/permissions_updater_unittest.cc
diff --git a/chrome/browser/extensions/permissions_updater_unittest.cc b/chrome/browser/extensions/permissions_updater_unittest.cc
index 30d71dc70bf87b8e08a9f884c30b45165dd11585..7a0e4318f48206537d440781aee3be023664b956 100644
--- a/chrome/browser/extensions/permissions_updater_unittest.cc
+++ b/chrome/browser/extensions/permissions_updater_unittest.cc
@@ -119,10 +119,13 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
APIPermissionSet default_apis;
default_apis.insert(APIPermission::kManagement);
+ ManifestPermissionSet empty_manifest_permissions;
+
URLPatternSet default_hosts;
AddPattern(&default_hosts, "http://a.com/*");
scoped_refptr<PermissionSet> default_permissions =
- new PermissionSet(default_apis, default_hosts, URLPatternSet());
+ new PermissionSet(default_apis, empty_manifest_permissions,
+ default_hosts, URLPatternSet());
// Make sure it loaded properly.
scoped_refptr<const PermissionSet> permissions =
@@ -138,7 +141,8 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
AddPattern(&hosts, "http://*.c.com/*");
scoped_refptr<PermissionSet> delta =
- new PermissionSet(apis, hosts, URLPatternSet());
+ new PermissionSet(apis, empty_manifest_permissions,
+ hosts, URLPatternSet());
PermissionsUpdaterListener listener;
PermissionsUpdater updater(profile_.get());
@@ -175,7 +179,8 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
// In the second part of the test, we'll remove the permissions that we
// just added except for 'notification'.
apis.erase(APIPermission::kNotification);
- delta = new PermissionSet(apis, hosts, URLPatternSet());
+ delta = new PermissionSet(apis, empty_manifest_permissions,
+ hosts, URLPatternSet());
listener.Reset();
updater.RemovePermissions(extension.get(), delta.get());

Powered by Google App Engine
This is Rietveld 408576698