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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 290 } |
291 | 291 |
292 virtual HttpNetworkSession* GetSession() OVERRIDE { | 292 virtual HttpNetworkSession* GetSession() OVERRIDE { |
293 return http_session_.get(); | 293 return http_session_.get(); |
294 } | 294 } |
295 | 295 |
296 private: | 296 private: |
297 OrderedSocketData* data_; | 297 OrderedSocketData* data_; |
298 scoped_ptr<SpdySessionDependencies> session_deps_; | 298 scoped_ptr<SpdySessionDependencies> session_deps_; |
299 scoped_refptr<HttpNetworkSession> http_session_; | 299 scoped_refptr<HttpNetworkSession> http_session_; |
300 scoped_refptr<SpdySession> session_; | 300 base::WeakPtr<SpdySession> session_; |
301 HostPortPair host_port_pair_; | 301 HostPortPair host_port_pair_; |
302 SpdySessionKey spdy_session_key_; | 302 SpdySessionKey spdy_session_key_; |
303 }; | 303 }; |
304 | 304 |
305 } // namespace | 305 } // namespace |
306 | 306 |
307 class WebSocketJobTest : public PlatformTest, | 307 class WebSocketJobTest : public PlatformTest, |
308 public ::testing::WithParamInterface<NextProto> { | 308 public ::testing::WithParamInterface<NextProto> { |
309 public: | 309 public: |
310 WebSocketJobTest() : spdy_util_(GetParam()) {} | 310 WebSocketJobTest() : spdy_util_(GetParam()) {} |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 } | 1102 } |
1103 | 1103 |
1104 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { | 1104 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { |
1105 WebSocketJob::set_websocket_over_spdy_enabled(true); | 1105 WebSocketJob::set_websocket_over_spdy_enabled(true); |
1106 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); | 1106 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); |
1107 } | 1107 } |
1108 | 1108 |
1109 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. | 1109 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. |
1110 // TODO(toyoshim,yutak): Add tests to verify closing handshake. | 1110 // TODO(toyoshim,yutak): Add tests to verify closing handshake. |
1111 } // namespace net | 1111 } // namespace net |
OLD | NEW |