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 993fcd4c70803fcbc23c8eb6ed525f8742613c63..832978c57bb97feaf8a11e2ebf77d1dda7ca27b5 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp |
@@ -55,8 +55,8 @@ TEST_F(ContentSecurityPolicyTest, ParseInsecureRequestPolicy) { |
// Enforced |
for (const auto& test : cases) { |
- SCOPED_TRACE(testing::Message() << "[Enforce] Header: `" << test.header |
- << "`"); |
+ SCOPED_TRACE(testing::Message() |
+ << "[Enforce] Header: `" << test.header << "`"); |
csp = ContentSecurityPolicy::create(); |
csp->didReceiveHeader(test.header, ContentSecurityPolicyHeaderTypeEnforce, |
ContentSecurityPolicyHeaderSourceHTTP); |
@@ -68,14 +68,15 @@ TEST_F(ContentSecurityPolicyTest, ParseInsecureRequestPolicy) { |
csp->bindToExecutionContext(document.get()); |
EXPECT_EQ(test.expectedPolicy, document->getInsecureRequestPolicy()); |
bool expectUpgrade = test.expectedPolicy & kUpgradeInsecureRequests; |
- EXPECT_EQ(expectUpgrade, document->insecureNavigationsToUpgrade()->contains( |
- document->url().host().impl()->hash())); |
+ EXPECT_EQ(expectUpgrade, |
+ document->insecureNavigationsToUpgrade()->contains( |
+ document->url().host().impl()->hash())); |
} |
// Report-Only |
for (const auto& test : cases) { |
- SCOPED_TRACE(testing::Message() << "[Report-Only] Header: `" << test.header |
- << "`"); |
+ SCOPED_TRACE(testing::Message() |
+ << "[Report-Only] Header: `" << test.header << "`"); |
csp = ContentSecurityPolicy::create(); |
csp->didReceiveHeader(test.header, ContentSecurityPolicyHeaderTypeReport, |
ContentSecurityPolicyHeaderSourceHTTP); |
@@ -647,9 +648,9 @@ TEST_F(ContentSecurityPolicyTest, NonceSinglePolicy) { |
}; |
for (const auto& test : cases) { |
- SCOPED_TRACE(testing::Message() << "Policy: `" << test.policy << "`, URL: `" |
- << test.url << "`, Nonce: `" << test.nonce |
- << "`"); |
+ SCOPED_TRACE(testing::Message() |
+ << "Policy: `" << test.policy << "`, URL: `" << test.url |
+ << "`, Nonce: `" << test.nonce << "`"); |
KURL resource = KURL(KURL(), test.url); |
unsigned expectedReports = test.allowed ? 0u : 1u; |
@@ -660,8 +661,9 @@ TEST_F(ContentSecurityPolicyTest, NonceSinglePolicy) { |
policy->didReceiveHeader(test.policy, |
ContentSecurityPolicyHeaderTypeEnforce, |
ContentSecurityPolicyHeaderSourceHTTP); |
- EXPECT_EQ(test.allowed, policy->allowScriptFromSource( |
- resource, String(test.nonce), ParserInserted)); |
+ EXPECT_EQ(test.allowed, |
+ policy->allowScriptFromSource(resource, String(test.nonce), |
+ ParserInserted)); |
// If this is expected to generate a violation, we should have sent a |
// report. |
EXPECT_EQ(expectedReports, policy->m_violationReportsSent.size()); |
@@ -813,8 +815,9 @@ TEST_F(ContentSecurityPolicyTest, NonceMultiplePolicy) { |
policy->didReceiveHeader(test.policy2, |
ContentSecurityPolicyHeaderTypeReport, |
ContentSecurityPolicyHeaderSourceHTTP); |
- EXPECT_EQ(test.allowed1, policy->allowScriptFromSource( |
- resource, String(test.nonce), ParserInserted)); |
+ EXPECT_EQ(test.allowed1, |
+ policy->allowScriptFromSource(resource, String(test.nonce), |
+ ParserInserted)); |
EXPECT_EQ(expectedReports, policy->m_violationReportsSent.size()); |
// Report / Enforce |
@@ -826,8 +829,9 @@ TEST_F(ContentSecurityPolicyTest, NonceMultiplePolicy) { |
policy->didReceiveHeader(test.policy2, |
ContentSecurityPolicyHeaderTypeEnforce, |
ContentSecurityPolicyHeaderSourceHTTP); |
- EXPECT_EQ(test.allowed2, policy->allowScriptFromSource( |
- resource, String(test.nonce), ParserInserted)); |
+ EXPECT_EQ(test.allowed2, |
+ policy->allowScriptFromSource(resource, String(test.nonce), |
+ ParserInserted)); |
EXPECT_EQ(expectedReports, policy->m_violationReportsSent.size()); |
// Enforce / Enforce |