summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/renderer_host/renderer_security_policy.cc1
-rw-r--r--chrome/browser/renderer_host/renderer_security_policy_unittest.cc2
2 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/renderer_security_policy.cc b/chrome/browser/renderer_host/renderer_security_policy.cc
index 108ef61..3350f59 100644
--- a/chrome/browser/renderer_host/renderer_security_policy.cc
+++ b/chrome/browser/renderer_host/renderer_security_policy.cc
@@ -82,6 +82,7 @@ RendererSecurityPolicy::RendererSecurityPolicy() {
RegisterWebSafeScheme("ftp");
RegisterWebSafeScheme("data");
RegisterWebSafeScheme("feed");
+ RegisterWebSafeScheme("chrome-extension");
// We know about the following psuedo schemes and treat them specially.
RegisterPseudoScheme("about");
diff --git a/chrome/browser/renderer_host/renderer_security_policy_unittest.cc b/chrome/browser/renderer_host/renderer_security_policy_unittest.cc
index a098112..c9faaea 100644
--- a/chrome/browser/renderer_host/renderer_security_policy_unittest.cc
+++ b/chrome/browser/renderer_host/renderer_security_policy_unittest.cc
@@ -33,6 +33,7 @@ TEST_F(RendererSecurityPolicyTest, IsWebSafeSchemeTest) {
EXPECT_TRUE(p->IsWebSafeScheme("ftp"));
EXPECT_TRUE(p->IsWebSafeScheme("data"));
EXPECT_TRUE(p->IsWebSafeScheme("feed"));
+ EXPECT_TRUE(p->IsWebSafeScheme("chrome-extension"));
EXPECT_FALSE(p->IsWebSafeScheme("registered-web-safe-scheme"));
p->RegisterWebSafeScheme("registered-web-safe-scheme");
@@ -63,6 +64,7 @@ TEST_F(RendererSecurityPolicyTest, StandardSchemesTest) {
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("data:text/html,<b>Hi</b>")));
EXPECT_TRUE(p->CanRequestURL(kRendererID,
GURL("view-source:http://www.google.com/")));
+ EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("chrome-extension://xy/z")));
// Dangerous
EXPECT_FALSE(p->CanRequestURL(kRendererID,