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

Unified Diff: content/browser/child_process_security_policy_unittest.cc

Issue 2358193002: Revert of Disallow navigations to blob URLs with non-canonical origins. (Closed)
Patch Set: Created 4 years, 3 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 | « content/browser/child_process_security_policy_impl.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a2f5fc49a98e264d26c829ff097610ba82becafc..24aa45bc21f050f00bea4642e7f5fe50674589a6 100644
--- a/content/browser/child_process_security_policy_unittest.cc
+++ b/content/browser/child_process_security_policy_unittest.cc
@@ -182,49 +182,6 @@
GURL("chrome://foo/bar")));
EXPECT_FALSE(
p->CanCommitURL(kRendererID, GURL("view-source:http://www.google.com/")));
-
- p->Remove(kRendererID);
-}
-
-TEST_F(ChildProcessSecurityPolicyTest, BlobSchemeTest) {
- ChildProcessSecurityPolicyImpl* p =
- ChildProcessSecurityPolicyImpl::GetInstance();
-
- p->Add(kRendererID);
-
- EXPECT_TRUE(
- p->CanRequestURL(kRendererID, GURL("blob:http://localhost/some-guid")));
- EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("blob:null/some-guid")));
- EXPECT_TRUE(
- p->CanRequestURL(kRendererID, GURL("blob:http://localhost/some-guid")));
- EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("blob:NulL/some-guid")));
- EXPECT_FALSE(p->CanRequestURL(
- kRendererID, GURL("blob:http://username@localhost/some-guid")));
- EXPECT_FALSE(p->CanRequestURL(
- kRendererID, GURL("blob:http://username @localhost/some-guid")));
- EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("blob:blob:some-guid")));
- EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("blob:some-guid")));
- EXPECT_FALSE(p->CanRequestURL(kRendererID,
- GURL("blob:filesystem:http://localhost/path")));
- EXPECT_FALSE(p->CanRequestURL(kRendererID,
- GURL("filesystem:blob:http://localhost/guid")));
-
- EXPECT_TRUE(
- p->CanCommitURL(kRendererID, GURL("blob:http://localhost/some-guid")));
- EXPECT_TRUE(p->CanCommitURL(kRendererID, GURL("blob:null/some-guid")));
- EXPECT_TRUE(
- p->CanCommitURL(kRendererID, GURL("blob:http://localhost/some-guid")));
- EXPECT_TRUE(p->CanCommitURL(kRendererID, GURL("blob:NulL/some-guid")));
- EXPECT_FALSE(p->CanCommitURL(
- kRendererID, GURL("blob:http://username@localhost/some-guid")));
- EXPECT_FALSE(p->CanCommitURL(
- kRendererID, GURL("blob:http://username @localhost/some-guid")));
- EXPECT_FALSE(p->CanCommitURL(kRendererID, GURL("blob:blob:some-guid")));
- EXPECT_FALSE(p->CanCommitURL(kRendererID, GURL("blob:some-guid")));
- EXPECT_FALSE(p->CanCommitURL(kRendererID,
- GURL("blob:filesystem:http://localhost/path")));
- EXPECT_FALSE(p->CanCommitURL(kRendererID,
- GURL("filesystem:blob:http://localhost/guid")));
p->Remove(kRendererID);
}
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698