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

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

Issue 1459633003: Remove ScopedVector from net/socket tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/websocket_transport_client_socket_pool.h" 5 #include "net/socket/websocket_transport_client_socket_pool.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) { 95 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) {
96 return test_base_.ReleaseOneConnection(keep_alive); 96 return test_base_.ReleaseOneConnection(keep_alive);
97 } 97 }
98 98
99 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) { 99 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) {
100 test_base_.ReleaseAllConnections(keep_alive); 100 test_base_.ReleaseAllConnections(keep_alive);
101 } 101 }
102 102
103 TestSocketRequest* request(int i) { return test_base_.request(i); } 103 TestSocketRequest* request(int i) { return test_base_.request(i); }
104 104
105 ScopedVector<TestSocketRequest>* requests() { return test_base_.requests(); } 105 std::vector<scoped_ptr<TestSocketRequest>>* requests() {
106 return test_base_.requests();
107 }
106 size_t completion_count() const { return test_base_.completion_count(); } 108 size_t completion_count() const { return test_base_.completion_count(); }
107 109
108 TestNetLog net_log_; 110 TestNetLog net_log_;
109 scoped_refptr<TransportSocketParams> params_; 111 scoped_refptr<TransportSocketParams> params_;
110 scoped_ptr<MockHostResolver> host_resolver_; 112 scoped_ptr<MockHostResolver> host_resolver_;
111 MockTransportClientSocketFactory client_socket_factory_; 113 MockTransportClientSocketFactory client_socket_factory_;
112 WebSocketTransportClientSocketPool pool_; 114 WebSocketTransportClientSocketPool pool_;
113 ClientSocketPoolTest test_base_; 115 ClientSocketPoolTest test_base_;
114 ScopedWebSocketEndpointZeroUnlockDelay zero_unlock_delay_; 116 ScopedWebSocketEndpointZeroUnlockDelay zero_unlock_delay_;
115 117
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 EXPECT_EQ(OK, request(1)->WaitForResult()); 1112 EXPECT_EQ(OK, request(1)->WaitForResult());
1111 // Third socket should still be waiting for endpoint. 1113 // Third socket should still be waiting for endpoint.
1112 ASSERT_FALSE(request(2)->handle()->is_initialized()); 1114 ASSERT_FALSE(request(2)->handle()->is_initialized());
1113 EXPECT_EQ(LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET, 1115 EXPECT_EQ(LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET,
1114 request(2)->handle()->GetLoadState()); 1116 request(2)->handle()->GetLoadState());
1115 } 1117 }
1116 1118
1117 } // namespace 1119 } // namespace
1118 1120
1119 } // namespace net 1121 } // namespace net
OLDNEW
« net/socket/socket_test_util.cc ('K') | « net/socket/transport_client_socket_pool_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698