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

Side by Side Diff: net/socket/ssl_client_socket_unittest.cc

Issue 1216153010: Certificate Transparency: Add observer for Signed Certificate Timestamps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 5 years, 5 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/cert/multi_log_ct_verifier_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 "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 676
677 // A mock CTVerifier that records every call to Verify but doesn't verify 677 // A mock CTVerifier that records every call to Verify but doesn't verify
678 // anything. 678 // anything.
679 class MockCTVerifier : public CTVerifier { 679 class MockCTVerifier : public CTVerifier {
680 public: 680 public:
681 MOCK_METHOD5(Verify, int(X509Certificate*, 681 MOCK_METHOD5(Verify, int(X509Certificate*,
682 const std::string&, 682 const std::string&,
683 const std::string&, 683 const std::string&,
684 ct::CTVerifyResult*, 684 ct::CTVerifyResult*,
685 const BoundNetLog&)); 685 const BoundNetLog&));
686 MOCK_METHOD1(SetObserver, void(CTVerifier::Observer*));
686 }; 687 };
687 688
688 class SSLClientSocketTest : public PlatformTest { 689 class SSLClientSocketTest : public PlatformTest {
689 public: 690 public:
690 SSLClientSocketTest() 691 SSLClientSocketTest()
691 : socket_factory_(ClientSocketFactory::GetDefaultFactory()), 692 : socket_factory_(ClientSocketFactory::GetDefaultFactory()),
692 cert_verifier_(new MockCertVerifier), 693 cert_verifier_(new MockCertVerifier),
693 transport_security_state_(new TransportSecurityState) { 694 transport_security_state_(new TransportSecurityState) {
694 cert_verifier_->set_default_result(OK); 695 cert_verifier_->set_default_result(OK);
695 context_.cert_verifier = cert_verifier_.get(); 696 context_.cert_verifier = cert_verifier_.get();
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 ssl_config.channel_id_enabled = true; 3453 ssl_config.channel_id_enabled = true;
3453 3454
3454 int rv; 3455 int rv;
3455 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); 3456 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
3456 3457
3457 EXPECT_EQ(ERR_UNEXPECTED, rv); 3458 EXPECT_EQ(ERR_UNEXPECTED, rv);
3458 EXPECT_FALSE(sock_->IsConnected()); 3459 EXPECT_FALSE(sock_->IsConnected());
3459 } 3460 }
3460 3461
3461 } // namespace net 3462 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/multi_log_ct_verifier_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698