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

Unified Diff: chrome/browser/extensions/content_script_apitest.cc

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext Created 6 years, 7 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/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/script_executor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/content_script_apitest.cc
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index b86889e06b733c6cef9156ff81ff1c854fdca006..01aa74391bcf5ffd898328dea7fe19e235a1d579 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -84,6 +84,18 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankIframes) {
RunExtensionTest("content_scripts/about_blank_iframes")) << message_;
}
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankAndSrcdoc) {
+ // The optional "*://*/*" permission is requested after verifying that
+ // content script insertion solely depends on content_scripts[*].matches.
+ // The permission is needed for chrome.tabs.executeScript tests.
+ PermissionsRequestFunction::SetAutoConfirmForTests(true);
+ PermissionsRequestFunction::SetIgnoreUserGestureForTests(true);
+
+ ASSERT_TRUE(StartEmbeddedTestServer());
+ ASSERT_TRUE(RunExtensionTest("content_scripts/about_blank_srcdoc"))
+ << message_;
+}
+
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionIframe) {
ASSERT_TRUE(StartEmbeddedTestServer());
ASSERT_TRUE(RunExtensionTest("content_scripts/extension_iframe")) << message_;
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/script_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698