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

Side by Side Diff: chrome/browser/extensions/api/socket/tls_socket_unittest.cc

Issue 353713005: Implements new, more robust design for communicating between SSLConnectJobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved tests back to ssl_client_socket_unittest.cc, fixed various other issues. Created 6 years, 4 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 | « no previous file | chrome/browser/io_thread.h » ('j') | net/cert/multi_threaded_cert_verifier.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/socket/tls_socket.h" 5 #include "extensions/browser/api/socket/tls_socket.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 MOCK_CONST_METHOD0(WasEverUsed, bool()); 57 MOCK_CONST_METHOD0(WasEverUsed, bool());
58 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool()); 58 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
59 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*)); 59 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*));
60 MOCK_METHOD5(ExportKeyingMaterial, 60 MOCK_METHOD5(ExportKeyingMaterial,
61 int(const StringPiece&, 61 int(const StringPiece&,
62 bool, 62 bool,
63 const StringPiece&, 63 const StringPiece&,
64 unsigned char*, 64 unsigned char*,
65 unsigned int)); 65 unsigned int));
66 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*)); 66 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*));
67 MOCK_CONST_METHOD0(InSEssionCache, bool());
68 MOCK_METHOD1(SetHandshakeCompletionCallback, void(const base::Closure&));
67 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); 69 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*));
68 MOCK_METHOD1(GetNextProto, 70 MOCK_METHOD1(GetNextProto,
69 net::SSLClientSocket::NextProtoStatus(std::string*)); 71 net::SSLClientSocket::NextProtoStatus(std::string*));
70 MOCK_CONST_METHOD0(GetServerBoundCertService, net::ServerBoundCertService*()); 72 MOCK_CONST_METHOD0(GetServerBoundCertService, net::ServerBoundCertService*());
71 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain, 73 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain,
72 scoped_refptr<net::X509Certificate>()); 74 scoped_refptr<net::X509Certificate>());
73 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); 75 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*());
74 virtual bool IsConnected() const OVERRIDE { return true; } 76 virtual bool IsConnected() const OVERRIDE { return true; }
75 77
76 private: 78 private:
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 total_bytes_written += amount_written_invocation; 312 total_bytes_written += amount_written_invocation;
311 cb.first.Run(amount_written_invocation); 313 cb.first.Run(amount_written_invocation);
312 } 314 }
313 315
314 ASSERT_EQ(total_bytes_requested, total_bytes_written) 316 ASSERT_EQ(total_bytes_requested, total_bytes_written)
315 << "There should be exactly as many bytes written as originally " 317 << "There should be exactly as many bytes written as originally "
316 << "requested to Write()."; 318 << "requested to Write().";
317 } 319 }
318 320
319 } // namespace extensions 321 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.h » ('j') | net/cert/multi_threaded_cert_verifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698