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

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

Issue 10796085: Give MockRead and MockWrite distinct types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix compile. Created 8 years, 5 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 | « net/socket/socket_test_util.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | 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/socks_client_socket_pool.h" 5 #include "net/socket/socks_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "net/base/mock_host_resolver.h" 10 #include "net/base/mock_host_resolver.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 data_.reset(new StaticSocketDataProvider(reads_.get(), 3, 43 data_.reset(new StaticSocketDataProvider(reads_.get(), 3,
44 writes_.get(), 3)); 44 writes_.get(), 3));
45 } 45 }
46 46
47 SocketDataProvider* data_provider() { return data_.get(); } 47 SocketDataProvider* data_provider() { return data_.get(); }
48 48
49 private: 49 private:
50 scoped_ptr<StaticSocketDataProvider> data_; 50 scoped_ptr<StaticSocketDataProvider> data_;
51 scoped_array<MockWrite> writes_; 51 scoped_array<MockWrite> writes_;
52 scoped_array<MockWrite> reads_; 52 scoped_array<MockRead> reads_;
53 }; 53 };
54 54
55 SOCKSClientSocketPoolTest() 55 SOCKSClientSocketPoolTest()
56 : ignored_transport_socket_params_(new TransportSocketParams( 56 : ignored_transport_socket_params_(new TransportSocketParams(
57 HostPortPair("proxy", 80), MEDIUM, false, false, 57 HostPortPair("proxy", 80), MEDIUM, false, false,
58 OnHostResolutionCallback())), 58 OnHostResolutionCallback())),
59 transport_histograms_("MockTCP"), 59 transport_histograms_("MockTCP"),
60 transport_socket_pool_( 60 transport_socket_pool_(
61 kMaxSockets, kMaxSocketsPerGroup, 61 kMaxSockets, kMaxSocketsPerGroup,
62 &transport_histograms_, 62 &transport_histograms_,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 (*requests())[0]->handle()->Reset(); 269 (*requests())[0]->handle()->Reset();
270 (*requests())[1]->handle()->Reset(); 270 (*requests())[1]->handle()->Reset();
271 } 271 }
272 272
273 // It would be nice to also test the timeouts in SOCKSClientSocketPool. 273 // It would be nice to also test the timeouts in SOCKSClientSocketPool.
274 274
275 } // namespace 275 } // namespace
276 276
277 } // namespace net 277 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698