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 |
174 private: | 182 private: |
175 net::BoundNetLog net_log_; | 183 net::BoundNetLog net_log_; |
176 FakeDataChannel* incoming_; | 184 FakeDataChannel* incoming_; |
177 FakeDataChannel* outgoing_; | 185 FakeDataChannel* outgoing_; |
178 | 186 |
179 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 187 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
180 }; | 188 }; |
181 | 189 |
182 } // namespace | 190 } // namespace |
183 | 191 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 EXPECT_GT(read_callback.WaitForResult(), 0); | 375 EXPECT_GT(read_callback.WaitForResult(), 0); |
368 } | 376 } |
369 if (client_ret == net::ERR_IO_PENDING) { | 377 if (client_ret == net::ERR_IO_PENDING) { |
370 EXPECT_GT(write_callback.WaitForResult(), 0); | 378 EXPECT_GT(write_callback.WaitForResult(), 0); |
371 } | 379 } |
372 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); | 380 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); |
373 } | 381 } |
374 #endif | 382 #endif |
375 | 383 |
376 } // namespace net | 384 } // namespace net |
OLD | NEW |