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

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

Issue 2499493004: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: Fix effective TLD wildcard bug, move to Leaky LazyInstance in PermissionsData, removed unnecessary … Created 3 years, 9 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/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) {

Powered by Google App Engine
This is Rietveld 408576698