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

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

Issue 10920070: Remove permission warnings from most tabs and windows APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 28cae61ed63982e34bd9b6c2400528d806dcc4c5..6de0e904a06e055c53705e79b8db5c2c53abfc85 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
@@ -6,8 +6,8 @@ var assertFalse = chrome.test.assertFalse;
var assertTrue = chrome.test.assertTrue;
var pass = chrome.test.callbackPass;
-var NO_TABS_PERMISSION =
- "You do not have permission to use 'windows.getAll'.";
+var NO_BOOKMARKS_PERMISSION =
+ "You do not have permission to use 'bookmarks.getTree'.";
chrome.test.getConfig(function(config) {
@@ -37,7 +37,7 @@ chrome.test.getConfig(function(config) {
chrome.test.runTests([
function denyRequest() {
chrome.permissions.request(
- {permissions: ['tabs'], origins: ['http://*.c.com/*']},
+ {permissions: ['bookmarks'], origins: ['http://*.c.com/*']},
pass(function(granted) {
// They were not granted, and there should be no error.
assertFalse(granted);
@@ -45,15 +45,15 @@ chrome.test.getConfig(function(config) {
// Make sure they weren't granted...
chrome.permissions.contains(
- {permissions: ['tabs'], origins:['http://*.c.com/*']},
+ {permissions: ['bookmarks'], origins:['http://*.c.com/*']},
pass(function(result) { assertFalse(result); }));
try {
- chrome.windows.getAll({populate: true}, function() {
- chrome.test.fail("Should not have tabs API permission.");
+ chrome.bookmarks.getTree(function() {
+ chrome.test.fail("Should not have bookmarks API permission.");
});
} catch (e) {
- assertTrue(e.message.indexOf(NO_TABS_PERMISSION) == 0);
+ assertTrue(e.message.indexOf(NO_BOOKMARKS_PERMISSION) == 0);
}
doReq('http://b.c.com/', pass(function(result) {

Powered by Google App Engine
This is Rietveld 408576698