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

Side by Side Diff: chrome/common/extensions/extension_permission_set_unittest.cc

Issue 8637019: Remove unused kDefault permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/extensions/extension_permission_set.h" 5 #include "chrome/common/extensions/extension_permission_set.h"
6 6
7 #include "base/json/json_value_serializer.h" 7 #include "base/json/json_value_serializer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 EXPECT_EQ(kTests[i].expect_increase, 596 EXPECT_EQ(kTests[i].expect_increase,
597 old_p->HasLessPrivilegesThan(new_p)) << kTests[i].base_name; 597 old_p->HasLessPrivilegesThan(new_p)) << kTests[i].base_name;
598 } 598 }
599 } 599 }
600 600
601 TEST(ExtensionPermissionSetTest, PermissionMessages) { 601 TEST(ExtensionPermissionSetTest, PermissionMessages) {
602 // Ensure that all permissions that needs to show install UI actually have 602 // Ensure that all permissions that needs to show install UI actually have
603 // strings associated with them. 603 // strings associated with them.
604 ExtensionAPIPermissionSet skip; 604 ExtensionAPIPermissionSet skip;
605 605
606 skip.insert(ExtensionAPIPermission::kDefault);
607
608 // These are considered "nuisance" or "trivial" permissions that don't need 606 // These are considered "nuisance" or "trivial" permissions that don't need
609 // a prompt. 607 // a prompt.
610 skip.insert(ExtensionAPIPermission::kContextMenus); 608 skip.insert(ExtensionAPIPermission::kContextMenus);
611 skip.insert(ExtensionAPIPermission::kIdle); 609 skip.insert(ExtensionAPIPermission::kIdle);
612 skip.insert(ExtensionAPIPermission::kNotification); 610 skip.insert(ExtensionAPIPermission::kNotification);
613 skip.insert(ExtensionAPIPermission::kUnlimitedStorage); 611 skip.insert(ExtensionAPIPermission::kUnlimitedStorage);
614 skip.insert(ExtensionAPIPermission::kTts); 612 skip.insert(ExtensionAPIPermission::kTts);
615 613
616 // TODO(erikkay) add a string for this permission. 614 // TODO(erikkay) add a string for this permission.
617 skip.insert(ExtensionAPIPermission::kBackground); 615 skip.insert(ExtensionAPIPermission::kBackground);
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 AddPattern(&non_empty_extent, "http://www.google.com/*"); 1094 AddPattern(&non_empty_extent, "http://www.google.com/*");
1097 1095
1098 perm_set = new ExtensionPermissionSet( 1096 perm_set = new ExtensionPermissionSet(
1099 empty_apis, non_empty_extent, empty_extent); 1097 empty_apis, non_empty_extent, empty_extent);
1100 EXPECT_FALSE(perm_set->IsEmpty()); 1098 EXPECT_FALSE(perm_set->IsEmpty());
1101 1099
1102 perm_set = new ExtensionPermissionSet( 1100 perm_set = new ExtensionPermissionSet(
1103 empty_apis, empty_extent, non_empty_extent); 1101 empty_apis, empty_extent, non_empty_extent);
1104 EXPECT_FALSE(perm_set->IsEmpty()); 1102 EXPECT_FALSE(perm_set->IsEmpty());
1105 } 1103 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698