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

Side by Side Diff: net/websockets/websocket_job_unittest.cc

Issue 18546008: [SPDY] Use WeakPtr<SpdySession> everywhere but SpdySessionPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test, other minor formatting/comment changes Created 7 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/websockets/websocket_job.cc ('k') | net/websockets/websocket_stream_base.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « net/websockets/websocket_job.cc ('k') | net/websockets/websocket_stream_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698