| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 virtual void SetOmniboxSpeculation() {} | 164 virtual void SetOmniboxSpeculation() {} |
| 165 | 165 |
| 166 virtual bool WasEverUsed() const { | 166 virtual bool WasEverUsed() const { |
| 167 return true; | 167 return true; |
| 168 } | 168 } |
| 169 | 169 |
| 170 virtual bool UsingTCPFastOpen() const { | 170 virtual bool UsingTCPFastOpen() const { |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 | 173 |
| 174 virtual int64 NumBytesRead() const { | |
| 175 return -1; | |
| 176 } | |
| 177 | |
| 178 virtual base::TimeDelta GetConnectTimeMicros() const { | |
| 179 return base::TimeDelta::FromMicroseconds(-1); | |
| 180 } | |
| 181 | |
| 182 private: | 174 private: |
| 183 net::BoundNetLog net_log_; | 175 net::BoundNetLog net_log_; |
| 184 FakeDataChannel* incoming_; | 176 FakeDataChannel* incoming_; |
| 185 FakeDataChannel* outgoing_; | 177 FakeDataChannel* outgoing_; |
| 186 | 178 |
| 187 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 179 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
| 188 }; | 180 }; |
| 189 | 181 |
| 190 } // namespace | 182 } // namespace |
| 191 | 183 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 EXPECT_GT(read_callback.WaitForResult(), 0); | 367 EXPECT_GT(read_callback.WaitForResult(), 0); |
| 376 } | 368 } |
| 377 if (client_ret == net::ERR_IO_PENDING) { | 369 if (client_ret == net::ERR_IO_PENDING) { |
| 378 EXPECT_GT(write_callback.WaitForResult(), 0); | 370 EXPECT_GT(write_callback.WaitForResult(), 0); |
| 379 } | 371 } |
| 380 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); | 372 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); |
| 381 } | 373 } |
| 382 #endif | 374 #endif |
| 383 | 375 |
| 384 } // namespace net | 376 } // namespace net |
| OLD | NEW |