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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 2850033002: Check Expect-CT at connection setup (Closed)
Patch Set: fix comment typo Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/spdy/chromium/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 6520 matching lines...) Expand 10 before | Expand all | Expand 10 after
6531 6531
6532 // An ExpectCTReporter that records the number of times OnExpectCTFailed() was 6532 // An ExpectCTReporter that records the number of times OnExpectCTFailed() was
6533 // called. 6533 // called.
6534 class MockExpectCTReporter : public TransportSecurityState::ExpectCTReporter { 6534 class MockExpectCTReporter : public TransportSecurityState::ExpectCTReporter {
6535 public: 6535 public:
6536 MockExpectCTReporter() : num_failures_(0) {} 6536 MockExpectCTReporter() : num_failures_(0) {}
6537 ~MockExpectCTReporter() override {} 6537 ~MockExpectCTReporter() override {}
6538 6538
6539 void OnExpectCTFailed(const HostPortPair& host_port_pair, 6539 void OnExpectCTFailed(const HostPortPair& host_port_pair,
6540 const GURL& report_uri, 6540 const GURL& report_uri,
6541 const net::SSLInfo& ssl_info) override { 6541 const X509Certificate* validated_certificate_chain,
6542 const X509Certificate* served_certificate_chain,
6543 const SignedCertificateTimestampAndStatusList&
6544 signed_certificate_timestamps) override {
6542 num_failures_++; 6545 num_failures_++;
6543 } 6546 }
6544 6547
6545 uint32_t num_failures() { return num_failures_; } 6548 uint32_t num_failures() { return num_failures_; }
6546 6549
6547 private: 6550 private:
6548 uint32_t num_failures_; 6551 uint32_t num_failures_;
6549 }; 6552 };
6550 6553
6551 // A CTPolicyEnforcer that returns a default CertPolicyCompliance value 6554 // A CTPolicyEnforcer that returns a default CertPolicyCompliance value
(...skipping 4515 matching lines...) Expand 10 before | Expand all | Expand 10 after
11067 AddTestInterceptor()->set_main_intercept_job(std::move(job)); 11070 AddTestInterceptor()->set_main_intercept_job(std::move(job));
11068 11071
11069 req->Start(); 11072 req->Start();
11070 req->Cancel(); 11073 req->Cancel();
11071 base::RunLoop().RunUntilIdle(); 11074 base::RunLoop().RunUntilIdle();
11072 EXPECT_EQ(ERR_ABORTED, d.request_status()); 11075 EXPECT_EQ(ERR_ABORTED, d.request_status());
11073 EXPECT_EQ(0, d.received_redirect_count()); 11076 EXPECT_EQ(0, d.received_redirect_count());
11074 } 11077 }
11075 11078
11076 } // namespace net 11079 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698