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

Unified Diff: content/browser/security_exploit_browsertest.cc

Issue 2182633007: Avoid using ContentBrowserClient::IsIllegalOrigin in ResourceDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile failures Created 4 years, 5 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
Index: content/browser/security_exploit_browsertest.cc
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index f9d6d7f935e50d0255017c7e2c568db8317eb30a..49321af38911a7a28c1d0f93948afd390aeb5d86 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -426,6 +426,12 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, InvalidOriginHeaders) {
NavigateToURL(shell(), web_url);
RenderFrameHost* web_rfh = shell()->web_contents()->GetMainFrame();
+ ResourceDispatcherHost::Get()->AddSchemeForAccessCheck("https");
+
+ ResourceDispatcherHost::Get()->AddOriginAccessInformation(
+ shell()->web_contents()->GetBrowserContext()->GetResourceContext(),
+ "https://isolated.bar.com");
+
// Web processes cannot make XHRs with chrome:// Origin headers.
{
RenderProcessHostWatcher web_process_killed(

Powered by Google App Engine
This is Rietveld 408576698