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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp

Issue 2295153004: Fix a null-deref in Upgrade-Insecure-Request's handling of unique origins. (Closed)
Patch Set: Test 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 | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
index fdc9c60ab84d04306c2c4c5ab8da2dc3c1d23015..2f1f9c255a8fd8064a26df5d2f3bcefcaa1e2ebf 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -65,10 +65,11 @@ TEST_F(ContentSecurityPolicyTest, ParseInsecureRequestPolicy)
document = Document::create();
document->setSecurityOrigin(secureOrigin);
+ document->setURL(secureURL);
csp->bindToExecutionContext(document.get());
EXPECT_EQ(test.expectedPolicy, document->getInsecureRequestPolicy());
bool expectUpgrade = test.expectedPolicy & kUpgradeInsecureRequests;
- EXPECT_EQ(expectUpgrade, document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
+ EXPECT_EQ(expectUpgrade, document->insecureNavigationsToUpgrade()->contains(document->url().host().impl()->hash()));
}
// Report-Only
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698