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

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

Issue 1100003006: Certificate Transparency: Fetching of Signed Tree Heads (DRAFT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revised design, addressed some comments Created 5 years, 6 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
« net/cert/ct_verifier.h ('K') | « net/net.gypi ('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_METHOD0(StopNotifications, void());
687 MOCK_METHOD1(SetObserver, void(CTVerifier::Observer*));
686 }; 688 };
687 689
688 class SSLClientSocketTest : public PlatformTest { 690 class SSLClientSocketTest : public PlatformTest {
689 public: 691 public:
690 SSLClientSocketTest() 692 SSLClientSocketTest()
691 : socket_factory_(ClientSocketFactory::GetDefaultFactory()), 693 : socket_factory_(ClientSocketFactory::GetDefaultFactory()),
692 cert_verifier_(new MockCertVerifier), 694 cert_verifier_(new MockCertVerifier),
693 transport_security_state_(new TransportSecurityState) { 695 transport_security_state_(new TransportSecurityState) {
694 cert_verifier_->set_default_result(OK); 696 cert_verifier_->set_default_result(OK);
695 context_.cert_verifier = cert_verifier_.get(); 697 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; 3454 ssl_config.channel_id_enabled = true;
3453 3455
3454 int rv; 3456 int rv;
3455 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); 3457 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
3456 3458
3457 EXPECT_EQ(ERR_UNEXPECTED, rv); 3459 EXPECT_EQ(ERR_UNEXPECTED, rv);
3458 EXPECT_FALSE(sock_->IsConnected()); 3460 EXPECT_FALSE(sock_->IsConnected());
3459 } 3461 }
3460 3462
3461 } // namespace net 3463 } // namespace net
OLDNEW
« net/cert/ct_verifier.h ('K') | « net/net.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698