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

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 9317013: Add a centralized mechanism for whitelisting access to extension permissions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix a couple tests Created 8 years, 11 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/common/extensions/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 0cadcb734c194709d37f7cb5a3b510f1b669f390..7c52a90e381f0ebb7c2f343c356204ffeb12bb8a 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -597,8 +597,13 @@ TEST_F(ExtensionManifestTest, HostedAppPermissions) {
permissions->Clear();
permissions->Append(p);
+ if (permission->should_enforce_whitelist()) {
+ LoadAndExpectError(Manifest(manifest.get(), name),
+ errors::kPermissionNotAllowed,
+ Extension::INTERNAL);
+
// Some permissions are only available to component hosted apps.
- if (permission->is_component_only()) {
+ } else if (permission->is_component_only()) {
LoadAndExpectError(Manifest(manifest.get(), name),
errors::kPermissionNotAllowed,
Extension::INTERNAL);

Powered by Google App Engine
This is Rietveld 408576698