| Index: chrome/test/data/extensions/api_test/content_scripts/permissions/background.js
|
| diff --git a/chrome/test/data/extensions/api_test/content_scripts/permissions/background.js b/chrome/test/data/extensions/api_test/content_scripts/permissions/background.js
|
| index fdd1278519c66cc41cd81b1089e462a0a22f3690..ecbe016cf3f235d58606d2903ac577113eef05ff 100644
|
| --- a/chrome/test/data/extensions/api_test/content_scripts/permissions/background.js
|
| +++ b/chrome/test/data/extensions/api_test/content_scripts/permissions/background.js
|
| @@ -83,6 +83,18 @@ chrome.test.getConfig(function(config) {
|
| }));
|
| },
|
|
|
| + // Make sure we can't inject a script into a policy blocked host.
|
| + function policyBlocksInjection() {
|
| + createTestTab('example.com', pass(function(tab) {
|
| + testTabId = tab.id;
|
| + chrome.tabs.executeScript(
|
| + tab.id, {code: 'document.title = "success"'},
|
| + callbackFail(
|
| + 'This page cannot be scripted due to ' +
|
| + 'an ExtensionsSettings policy.'));
|
| + }));
|
| + },
|
| +
|
| // Try the host again, except outside of the permissions.request callback.
|
| function sameHost() {
|
| createTestTab('a.com', pass(function(tab) {
|
|
|