OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 MockConnect connect_data(SYNCHRONOUS, OK); | 279 MockConnect connect_data(SYNCHRONOUS, OK); |
280 data_->set_connect_data(connect_data); | 280 data_->set_connect_data(connect_data); |
281 session_deps_.reset(new SpdySessionDependencies(next_proto)); | 281 session_deps_.reset(new SpdySessionDependencies(next_proto)); |
282 session_deps_->socket_factory->AddSocketDataProvider(data_); | 282 session_deps_->socket_factory->AddSocketDataProvider(data_); |
283 http_session_ = | 283 http_session_ = |
284 SpdySessionDependencies::SpdyCreateSession(session_deps_.get()); | 284 SpdySessionDependencies::SpdyCreateSession(session_deps_.get()); |
285 host_port_pair_.set_host("example.com"); | 285 host_port_pair_.set_host("example.com"); |
286 host_port_pair_.set_port(80); | 286 host_port_pair_.set_port(80); |
287 spdy_session_key_ = SpdySessionKey(host_port_pair_, | 287 spdy_session_key_ = SpdySessionKey(host_port_pair_, |
288 ProxyServer::Direct(), | 288 ProxyServer::Direct(), |
289 kPrivacyModeDisabled); | 289 PRIVACY_MODE_DISABLED); |
290 session_ = CreateInsecureSpdySession( | 290 session_ = CreateInsecureSpdySession( |
291 http_session_, spdy_session_key_, BoundNetLog()); | 291 http_session_, spdy_session_key_, BoundNetLog()); |
292 } | 292 } |
293 | 293 |
294 virtual int CreateTransaction( | 294 virtual int CreateTransaction( |
295 RequestPriority priority, | 295 RequestPriority priority, |
296 scoped_ptr<HttpTransaction>* trans) OVERRIDE { | 296 scoped_ptr<HttpTransaction>* trans) OVERRIDE { |
297 NOTREACHED(); | 297 NOTREACHED(); |
298 return ERR_UNEXPECTED; | 298 return ERR_UNEXPECTED; |
299 } | 299 } |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 } | 1118 } |
1119 | 1119 |
1120 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { | 1120 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { |
1121 WebSocketJob::set_websocket_over_spdy_enabled(true); | 1121 WebSocketJob::set_websocket_over_spdy_enabled(true); |
1122 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); | 1122 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); |
1123 } | 1123 } |
1124 | 1124 |
1125 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. | 1125 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. |
1126 // TODO(toyoshim,yutak): Add tests to verify closing handshake. | 1126 // TODO(toyoshim,yutak): Add tests to verify closing handshake. |
1127 } // namespace net | 1127 } // namespace net |
OLD | NEW |