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

Unified Diff: Source/core/loader/FrameFetchContextTest.cpp

Issue 1010893003: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MOARASSERT Created 5 years, 9 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 | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameFetchContextTest.cpp
diff --git a/Source/core/loader/FrameFetchContextTest.cpp b/Source/core/loader/FrameFetchContextTest.cpp
index 7b53ed7deb60bd0833a3efa8f9f7fc6d35df5cfa..91ac63d01d1e4dc3e06809ea4dfabebf4ebff804 100644
--- a/Source/core/loader/FrameFetchContextTest.cpp
+++ b/Source/core/loader/FrameFetchContextTest.cpp
@@ -140,8 +140,7 @@ TEST_F(FrameFetchContextUpgradeTest, UpgradeInsecureResourceRequests)
document->setInsecureRequestsPolicy(SecurityContext::InsecureRequestsUpgrade);
for (auto test : tests) {
- // secureOrigin's host is 'secureorigin.test', not 'example.test'
- document->setSecurityOrigin(secureOrigin);
+ document->insecureNavigationsToUpgrade()->clear();
// We always upgrade for FrameTypeNone and FrameTypeNested.
expectUpgrade(test.original, WebURLRequest::RequestContextScript, WebURLRequest::FrameTypeNone, test.upgraded);
@@ -155,8 +154,8 @@ TEST_F(FrameFetchContextUpgradeTest, UpgradeInsecureResourceRequests)
expectUpgrade(test.original, WebURLRequest::RequestContextForm, WebURLRequest::FrameTypeTopLevel, test.upgraded);
expectUpgrade(test.original, WebURLRequest::RequestContextForm, WebURLRequest::FrameTypeAuxiliary, test.upgraded);
- // Or unless the host of the document matches the host of the resource:
- document->setSecurityOrigin(exampleOrigin);
+ // Or unless the host of the resource is in the document's InsecureNavigationsSet:
+ document->addInsecureNavigationUpgrade(exampleOrigin->host().impl()->hash());
expectUpgrade(test.original, WebURLRequest::RequestContextScript, WebURLRequest::FrameTypeTopLevel, test.upgraded);
expectUpgrade(test.original, WebURLRequest::RequestContextScript, WebURLRequest::FrameTypeAuxiliary, test.upgraded);
}
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698