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

Side by Side Diff: chrome/test/data/extensions/api_test/permissions/file_access_no/background.js

Issue 2360073002: [Extensions] Isolate ExtensionFunction results_ and error_ (Closed)
Patch Set: errorwithargs Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var callbackFail = chrome.test.callbackFail; 5 var callbackFail = chrome.test.callbackFail;
6 var callbackPass = chrome.test.callbackPass; 6 var callbackPass = chrome.test.callbackPass;
7 var expectedError = 7 var expectedError =
8 "Invalid value for origin pattern file:///Invalid scheme.: *"; 8 "Invalid value for origin pattern file:///Invalid scheme.: *";
9 9
10 function test() { 10 function test() {
11 chrome.permissions.request({"origins": ["file:///*"]}, 11 chrome.permissions.request({"origins": ["file:///*"]},
12 callbackFail(expectedError, function(granted) { 12 callbackFail(expectedError, function(granted) {
13 chrome.test.assertFalse(granted); 13 chrome.test.assertFalse(!!granted);
14 chrome.permissions.getAll(callbackPass(function(permissions) { 14 chrome.permissions.getAll(callbackPass(function(permissions) {
15 chrome.test.assertEq([], permissions.origins); 15 chrome.test.assertEq([], permissions.origins);
16 chrome.test.succeed(); 16 chrome.test.succeed();
17 })); 17 }));
18 })); 18 }));
19 } 19 }
20 20
21 chrome.test.runTests([test]); 21 chrome.test.runTests([test]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698