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

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

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Add call to CBS_len() Created 4 years, 3 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 | net/http/http_basic_stream.h » ('j') | no next file with comments »
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 MOCK_METHOD5(ExportKeyingMaterial, 66 MOCK_METHOD5(ExportKeyingMaterial,
67 int(const StringPiece&, 67 int(const StringPiece&,
68 bool, 68 bool,
69 const StringPiece&, 69 const StringPiece&,
70 unsigned char*, 70 unsigned char*,
71 unsigned int)); 71 unsigned int));
72 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); 72 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*));
73 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain, 73 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain,
74 scoped_refptr<net::X509Certificate>()); 74 scoped_refptr<net::X509Certificate>());
75 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); 75 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*());
76 MOCK_METHOD2(GetSignedEKMForTokenBinding, 76 MOCK_METHOD3(GetTokenBindingSignature,
77 net::Error(crypto::ECPrivateKey*, std::vector<uint8_t>*)); 77 net::Error(crypto::ECPrivateKey*,
78 net::TokenBindingType,
79 std::vector<uint8_t>*));
78 MOCK_CONST_METHOD0(GetChannelIDKey, crypto::ECPrivateKey*()); 80 MOCK_CONST_METHOD0(GetChannelIDKey, crypto::ECPrivateKey*());
79 bool IsConnected() const override { return true; } 81 bool IsConnected() const override { return true; }
80 82
81 private: 83 private:
82 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); 84 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket);
83 }; 85 };
84 86
85 class MockTCPSocket : public net::TCPClientSocket { 87 class MockTCPSocket : public net::TCPClientSocket {
86 public: 88 public:
87 explicit MockTCPSocket(const net::AddressList& address_list) 89 explicit MockTCPSocket(const net::AddressList& address_list)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 total_bytes_written += amount_written_invocation; 316 total_bytes_written += amount_written_invocation;
315 cb.first.Run(amount_written_invocation); 317 cb.first.Run(amount_written_invocation);
316 } 318 }
317 319
318 ASSERT_EQ(total_bytes_requested, total_bytes_written) 320 ASSERT_EQ(total_bytes_requested, total_bytes_written)
319 << "There should be exactly as many bytes written as originally " 321 << "There should be exactly as many bytes written as originally "
320 << "requested to Write()."; 322 << "requested to Write().";
321 } 323 }
322 324
323 } // namespace extensions 325 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | net/http/http_basic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698