Index: content/browser/child_process_security_policy_unittest.cc |
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc |
index f1f214c45c5b01069dd6f87d142ef47e4fd0c5b2..4ef3306e8aee18a28c7b6892a28582db72e3e00b 100644 |
--- a/content/browser/child_process_security_policy_unittest.cc |
+++ b/content/browser/child_process_security_policy_unittest.cc |
@@ -45,6 +45,8 @@ TEST_F(ChildProcessSecurityPolicyTest, IsWebSafeSchemeTest) { |
EXPECT_FALSE(p->IsWebSafeScheme("registered-web-safe-scheme")); |
p->RegisterWebSafeScheme("registered-web-safe-scheme"); |
EXPECT_TRUE(p->IsWebSafeScheme("registered-web-safe-scheme")); |
+ |
+ EXPECT_FALSE(p->IsWebSafeScheme(chrome::kChromeUIScheme)); |
} |
TEST_F(ChildProcessSecurityPolicyTest, IsPseudoSchemeTest) { |
@@ -57,6 +59,8 @@ TEST_F(ChildProcessSecurityPolicyTest, IsPseudoSchemeTest) { |
EXPECT_FALSE(p->IsPseudoScheme("registered-pseudo-scheme")); |
p->RegisterPseudoScheme("registered-pseudo-scheme"); |
EXPECT_TRUE(p->IsPseudoScheme("registered-pseudo-scheme")); |
+ |
+ EXPECT_FALSE(p->IsPseudoScheme(chrome::kChromeUIScheme)); |
} |
TEST_F(ChildProcessSecurityPolicyTest, IsDisabledSchemeTest) { |
@@ -119,6 +123,7 @@ TEST_F(ChildProcessSecurityPolicyTest, AboutTest) { |
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("about:CrASh"))); |
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("abOuT:cAChe"))); |
+ // These requests for about: pages should be denied. |
p->GrantRequestURL(kRendererID, GURL(chrome::kTestMemoryURL)); |
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL(chrome::kTestMemoryURL))); |
@@ -131,6 +136,16 @@ TEST_F(ChildProcessSecurityPolicyTest, AboutTest) { |
p->GrantRequestURL(kRendererID, GURL(chrome::kTestHangURL)); |
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL(chrome::kTestHangURL))); |
+ // These requests for chrome:// pages should be granted. |
+ p->GrantRequestURL(kRendererID, GURL(chrome::kTestNewTabURL)); |
+ EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestNewTabURL))); |
+ |
+ p->GrantRequestURL(kRendererID, GURL(chrome::kTestHistoryURL)); |
+ EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestHistoryURL))); |
+ |
+ p->GrantRequestURL(kRendererID, GURL(chrome::kTestBookmarksURL)); |
+ EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestBookmarksURL))); |
+ |
p->Remove(kRendererID); |
} |