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

Side by Side Diff: net/socket/ssl_server_socket_unittest.cc

Issue 7189055: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: syncing to head Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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 int GetConnectTimeMicros() const {
179 return -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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 EXPECT_GT(read_callback.WaitForResult(), 0); 374 EXPECT_GT(read_callback.WaitForResult(), 0);
367 } 375 }
368 if (client_ret == net::ERR_IO_PENDING) { 376 if (client_ret == net::ERR_IO_PENDING) {
369 EXPECT_GT(write_callback.WaitForResult(), 0); 377 EXPECT_GT(write_callback.WaitForResult(), 0);
370 } 378 }
371 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); 379 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size()));
372 } 380 }
373 #endif 381 #endif
374 382
375 } // namespace net 383 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698