| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |