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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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: 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp ('k') | third_party/WebKit/Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698