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

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

Issue 1414223005: Remove URLs from chrome.tabs.executeScript permission warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test case Created 5 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 assertEq = chrome.test.assertEq; 5 var assertEq = chrome.test.assertEq;
6 var assertFalse = chrome.test.assertFalse; 6 var assertFalse = chrome.test.assertFalse;
7 var assertTrue = chrome.test.assertTrue; 7 var assertTrue = chrome.test.assertTrue;
8 var callbackFail = chrome.test.callbackFail; 8 var callbackFail = chrome.test.callbackFail;
9 var callbackPass = chrome.test.callbackPass; 9 var callbackPass = chrome.test.callbackPass;
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 assertTrue(canXhr(tab.url)); 49 assertTrue(canXhr(tab.url));
50 50
51 chrome.automation.getTree(callbackPass(function(rootNode) { 51 chrome.automation.getTree(callbackPass(function(rootNode) {
52 assertFalse(rootNode == undefined); 52 assertFalse(rootNode == undefined);
53 assertEq(RoleType.rootWebArea, rootNode.role); 53 assertEq(RoleType.rootWebArea, rootNode.role);
54 })); 54 }));
55 }); 55 });
56 56
57 chrome.webNavigation.onCompleted.addListener(function(details) { 57 chrome.webNavigation.onCompleted.addListener(function(details) {
58 chrome.tabs.executeScript({ code: 'true' }, callbackFail( 58 chrome.tabs.executeScript({ code: 'true' }, callbackFail(
59 'Cannot access contents of url "' + details.url + 59 'Cannot access contents of the page. ' +
60 '". Extension manifest must request permission to access this host.')); 60 'Extension manifest must request permission to access the ' +
61 'respective host.'));
61 62
62 chrome.automation.getTree(callbackFail( 63 chrome.automation.getTree(callbackFail(
63 'Cannot request automation tree on url "' + details.url + 64 'Cannot request automation tree on url "' + details.url +
64 '". Extension manifest must request permission to access this host.')); 65 '". Extension manifest must request permission to access this host.'));
65 66
66 assertFalse(canXhr(details.url)); 67 assertFalse(canXhr(details.url));
67 }); 68 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_apitest.cc ('k') | chrome/test/data/extensions/api_test/executescript/basic/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698