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

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

Issue 10829186: Tabs API is usable without tabs permission. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ETU now SetString()'s for empty values Created 8 years, 4 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
« no previous file with comments | « chrome/test/data/extensions/api_test/events/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/permissions/disabled/background.js
diff --git a/chrome/test/data/extensions/api_test/permissions/disabled/background.js b/chrome/test/data/extensions/api_test/permissions/disabled/background.js
index e130a1f8764980a7049851cd77e092bff13c26c3..e92326dc4052f9be5565fb6e5bf35cca245a2f28 100644
--- a/chrome/test/data/extensions/api_test/permissions/disabled/background.js
+++ b/chrome/test/data/extensions/api_test/permissions/disabled/background.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// All of the calls to chrome.* functions should fail, since this extension
-// has requested no permissions.
+// All of the calls to chrome.* functions should fail, with the exception of
+// chrome.tabs.*, since this extension has requested no permissions.
chrome.test.runTests([
function history() {
@@ -27,13 +27,18 @@ chrome.test.runTests([
}
},
+ // Tabs functionality should be enabled even if the tabs permissions are not
+ // present.
function tabs() {
try {
- chrome.tabs.getSelected(null, function(results) {
- chrome.test.fail();
+ chrome.tabs.create({'url': '1'}, function(tab) {
+ // Tabs strip sensitive data without permissions.
+ //chrome.test.assertFalse(tab.url)
+ chrome.test.assertEq('', tab.url)
+ chrome.test.succeed();
});
} catch (e) {
- chrome.test.succeed();
+ chrome.test.fail();
}
},
« no previous file with comments | « chrome/test/data/extensions/api_test/events/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698