| OLD | NEW |
| 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 // This test suite uses SSLClientSocket to test the implementation of | 5 // This test suite uses SSLClientSocket to test the implementation of |
| 6 // SSLServerSocket. In order to establish connections between the sockets | 6 // SSLServerSocket. In order to establish connections between the sockets |
| 7 // we need two additional classes: | 7 // we need two additional classes: |
| 8 // 1. FakeSocket | 8 // 1. FakeSocket |
| 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. | 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. |
| 10 // | 10 // |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 void ClearConnectionAttempts() override {} | 311 void ClearConnectionAttempts() override {} |
| 312 | 312 |
| 313 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} | 313 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
| 314 | 314 |
| 315 int64_t GetTotalReceivedBytes() const override { | 315 int64_t GetTotalReceivedBytes() const override { |
| 316 NOTIMPLEMENTED(); | 316 NOTIMPLEMENTED(); |
| 317 return 0; | 317 return 0; |
| 318 } | 318 } |
| 319 | 319 |
| 320 void DumpMemoryStats( |
| 321 base::trace_event::MemoryAllocatorDump* dump) const override {} |
| 322 |
| 320 private: | 323 private: |
| 321 NetLogWithSource net_log_; | 324 NetLogWithSource net_log_; |
| 322 FakeDataChannel* incoming_; | 325 FakeDataChannel* incoming_; |
| 323 FakeDataChannel* outgoing_; | 326 FakeDataChannel* outgoing_; |
| 324 | 327 |
| 325 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 328 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
| 326 }; | 329 }; |
| 327 | 330 |
| 328 } // namespace | 331 } // namespace |
| 329 | 332 |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 int server_ret = server_socket_->Handshake(handshake_callback.callback()); | 1119 int server_ret = server_socket_->Handshake(handshake_callback.callback()); |
| 1117 | 1120 |
| 1118 client_ret = connect_callback.GetResult(client_ret); | 1121 client_ret = connect_callback.GetResult(client_ret); |
| 1119 server_ret = handshake_callback.GetResult(server_ret); | 1122 server_ret = handshake_callback.GetResult(server_ret); |
| 1120 | 1123 |
| 1121 ASSERT_THAT(client_ret, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); | 1124 ASSERT_THAT(client_ret, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); |
| 1122 ASSERT_THAT(server_ret, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); | 1125 ASSERT_THAT(server_ret, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); |
| 1123 } | 1126 } |
| 1124 | 1127 |
| 1125 } // namespace net | 1128 } // namespace net |
| OLD | NEW |