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 #include "net/websockets/websocket_job.h" | 5 #include "net/websockets/websocket_job.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 EXPECT_FALSE(spdy_session_pool->HasSession(host_port_proxy_pair_)); | 269 EXPECT_FALSE(spdy_session_pool->HasSession(host_port_proxy_pair_)); |
270 session_ = | 270 session_ = |
271 spdy_session_pool->Get(host_port_proxy_pair_, net::BoundNetLog()); | 271 spdy_session_pool->Get(host_port_proxy_pair_, net::BoundNetLog()); |
272 EXPECT_TRUE(spdy_session_pool->HasSession(host_port_proxy_pair_)); | 272 EXPECT_TRUE(spdy_session_pool->HasSession(host_port_proxy_pair_)); |
273 | 273 |
274 transport_params_ = new net::TransportSocketParams(host_port_pair_, | 274 transport_params_ = new net::TransportSocketParams(host_port_pair_, |
275 net::MEDIUM, | 275 net::MEDIUM, |
276 false, | 276 false, |
277 false); | 277 false); |
278 net::ClientSocketHandle* connection = new net::ClientSocketHandle; | 278 net::ClientSocketHandle* connection = new net::ClientSocketHandle; |
279 EXPECT_EQ(net::OK, connection->Init(host_port_pair_.ToString(), | 279 EXPECT_EQ(net::OK, |
280 transport_params_, | 280 connection->Init(host_port_pair_.ToString(), transport_params_, |
281 net::MEDIUM, | 281 net::MEDIUM, net::CompletionCallback(), |
282 NULL, | 282 http_session_->GetTransportSocketPool(), |
283 http_session_->GetTransportSocketPool(), | 283 net::BoundNetLog())); |
284 net::BoundNetLog())); | |
285 EXPECT_EQ(net::OK, | 284 EXPECT_EQ(net::OK, |
286 session_->InitializeWithSocket(connection, false, net::OK)); | 285 session_->InitializeWithSocket(connection, false, net::OK)); |
287 } | 286 } |
288 virtual int CreateTransaction(scoped_ptr<net::HttpTransaction>* trans) { | 287 virtual int CreateTransaction(scoped_ptr<net::HttpTransaction>* trans) { |
289 NOTREACHED(); | 288 NOTREACHED(); |
290 return net::ERR_UNEXPECTED; | 289 return net::ERR_UNEXPECTED; |
291 } | 290 } |
292 virtual net::HttpCache* GetCache() { | 291 virtual net::HttpCache* GetCache() { |
293 NOTREACHED(); | 292 NOTREACHED(); |
294 return NULL; | 293 return NULL; |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 | 1080 |
1082 TEST_F(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { | 1081 TEST_F(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { |
1083 WebSocketJob::set_websocket_over_spdy_enabled(true); | 1082 WebSocketJob::set_websocket_over_spdy_enabled(true); |
1084 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); | 1083 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); |
1085 } | 1084 } |
1086 | 1085 |
1087 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. | 1086 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. |
1088 // TODO(toyoshim,yutak): Add tests to verify closing handshake. | 1087 // TODO(toyoshim,yutak): Add tests to verify closing handshake. |
1089 | 1088 |
1090 } // namespace net | 1089 } // namespace net |
OLD | NEW |