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

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

Issue 10855123: Remove unnecessary assignment in transport_client_socket_unittest.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/socket/tcp_client_socket.h" 5 #include "net/socket/tcp_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 private: 96 private:
97 scoped_refptr<TCPListenSocket> listen_sock_; 97 scoped_refptr<TCPListenSocket> listen_sock_;
98 scoped_refptr<TCPListenSocket> connected_sock_; 98 scoped_refptr<TCPListenSocket> connected_sock_;
99 bool close_server_socket_on_next_send_; 99 bool close_server_socket_on_next_send_;
100 }; 100 };
101 101
102 void TransportClientSocketTest::SetUp() { 102 void TransportClientSocketTest::SetUp() {
103 ::testing::TestWithParam<ClientSocketTestTypes>::SetUp(); 103 ::testing::TestWithParam<ClientSocketTestTypes>::SetUp();
104 104
105 // Find a free port to listen on 105 // Find a free port to listen on
106 scoped_refptr<TCPListenSocket> sock = NULL; 106 scoped_refptr<TCPListenSocket> sock;
107 int port; 107 int port;
108 // Range of ports to listen on. Shouldn't need to try many. 108 // Range of ports to listen on. Shouldn't need to try many.
109 const int kMinPort = 10100; 109 const int kMinPort = 10100;
110 const int kMaxPort = 10200; 110 const int kMaxPort = 10200;
111 #if defined(OS_WIN) 111 #if defined(OS_WIN)
112 EnsureWinsockInit(); 112 EnsureWinsockInit();
113 #endif 113 #endif
114 for (port = kMinPort; port < kMaxPort; port++) { 114 for (port = kMinPort; port < kMaxPort; port++) {
115 sock = TCPListenSocket::CreateAndListen("127.0.0.1", port, this); 115 sock = TCPListenSocket::CreateAndListen("127.0.0.1", port, this);
116 if (sock.get()) 116 if (sock.get())
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 // It's possible the read is blocked because it's already read all the data. 440 // It's possible the read is blocked because it's already read all the data.
441 // Close the server socket, so there will at least be a 0-byte read. 441 // Close the server socket, so there will at least be a 0-byte read.
442 CloseServerSocket(); 442 CloseServerSocket();
443 443
444 rv = callback.WaitForResult(); 444 rv = callback.WaitForResult();
445 EXPECT_GE(rv, 0); 445 EXPECT_GE(rv, 0);
446 } 446 }
447 447
448 } // namespace net 448 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698