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

Unified Diff: chrome/test/data/extensions/api_test/permissions/optional_deny/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_deny/background.js
diff --git a/chrome/test/data/extensions/api_test/permissions/optional_deny/background.js b/chrome/test/data/extensions/api_test/permissions/optional_deny/background.js
index 8b2a6db6183a97dfbfd61fa9349a84137e040ed3..2f55089331394ea5c339dfec8e663bf492b66cfa 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional_deny/background.js
+++ b/chrome/test/data/extensions/api_test/permissions/optional_deny/background.js
@@ -60,6 +60,15 @@ chrome.test.getConfig(function(config) {
assertFalse(result);
}));
}));
+ },
+
+ function noPromptForActivePermissions() {
+ // We shouldn't prompt if the extension already has the permissions.
+ chrome.permissions.request(
+ {permissions: ["management"]},
+ pass(function(granted) {
+ assertTrue(granted);
+ }));
}
]);
});

Powered by Google App Engine
This is Rietveld 408576698