summaryrefslogtreecommitdiffstats
path: root/chrome/browser/child_process_security_policy_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/child_process_security_policy_unittest.cc')
-rw-r--r--chrome/browser/child_process_security_policy_unittest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/child_process_security_policy_unittest.cc b/chrome/browser/child_process_security_policy_unittest.cc
index 6dbb5d1..ae8645b 100644
--- a/chrome/browser/child_process_security_policy_unittest.cc
+++ b/chrome/browser/child_process_security_policy_unittest.cc
@@ -173,6 +173,14 @@ TEST_F(ChildProcessSecurityPolicyTest, ViewSource) {
EXPECT_FALSE(p->CanRequestURL(kRendererID,
GURL("view-source:file:///etc/passwd")));
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("file:///etc/passwd")));
+ EXPECT_FALSE(p->CanRequestURL(
+ kRendererID, GURL("view-source:view-source:http://www.google.com/")));
+ EXPECT_FALSE(p->CanRequestURL(
+ kRendererID, GURL("view-source:print:http://www.google.com/")));
+ EXPECT_TRUE(p->CanRequestURL(
+ kRendererID, GURL("print:view-source:http://www.google.com/")));
+ EXPECT_FALSE(p->CanRequestURL(kRendererID,
+ GURL("print:print:http://www.google.com/")));
p->GrantRequestURL(kRendererID, GURL("view-source:file:///etc/passwd"));
// View source needs to be able to request the embedded scheme.