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

Unified Diff: chrome/test/data/extensions/api_test/permissions/optional/background.js

Issue 9222013: Prevent unnecessary prompts when unpacked extensions use chrome.permissions.request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reword comment 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/test/data/extensions/api_test/permissions/optional/background.js
diff --git a/chrome/test/data/extensions/api_test/permissions/optional/background.js b/chrome/test/data/extensions/api_test/permissions/optional/background.js
index 8e3d1836c70bd2304f69ab6f770cf5a7449323f9..e904231c31fac4c0acd9f4b2c15b061afd9891a1 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional/background.js
+++ b/chrome/test/data/extensions/api_test/permissions/optional/background.js
@@ -155,6 +155,16 @@ chrome.test.getConfig(function(config) {
}));
},
+ // These permissions should be on the granted list because they're on the
+ // extension's default permission list.
+ function requestGrantedPermission() {
+ chrome.permissions.request(
+ {permissions: ['management'], origins: ['http://a.com/*']},
+ pass(function(granted) {
+ assertTrue(granted);
+ }));
+ },
+
// You can't remove required permissions.
function removeRequired() {
chrome.permissions.remove(
@@ -304,7 +314,7 @@ chrome.test.getConfig(function(config) {
});
chrome.permissions.request(
- {permissions: ['tabs']}, pass(function(granted) {
+ {permissions: ['tabs', 'management']}, pass(function(granted) {
assertTrue(granted);
chrome.permissions.remove(
{permissions: ['tabs']}, pass(function() {
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/test/data/extensions/api_test/permissions/optional_deny/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698