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

Side by Side Diff: net/spdy/spdy_websocket_stream_unittest.cc

Issue 8423028: Persist dynamically learned SPDY settings (like CWND). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/spdy/spdy_websocket_stream.h" 5 #include "net/spdy/spdy_websocket_stream.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 int InitSession(MockRead* reads, size_t reads_count, 248 int InitSession(MockRead* reads, size_t reads_count,
249 MockWrite* writes, size_t writes_count, 249 MockWrite* writes, size_t writes_count,
250 bool throttling) { 250 bool throttling) {
251 data_ = new OrderedSocketData(reads, reads_count, writes, writes_count); 251 data_ = new OrderedSocketData(reads, reads_count, writes, writes_count);
252 session_deps_.socket_factory->AddSocketDataProvider(data_.get()); 252 session_deps_.socket_factory->AddSocketDataProvider(data_.get());
253 http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_); 253 http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
254 SpdySessionPool* spdy_session_pool(http_session_->spdy_session_pool()); 254 SpdySessionPool* spdy_session_pool(http_session_->spdy_session_pool());
255 255
256 if (throttling) { 256 if (throttling) {
257 // Set max concurrent streams to 1. 257 // Set max concurrent streams to 1.
258 spdy_session_pool->mutable_spdy_settings()->Set( 258 spdy_session_pool->http_server_properties()->SetSpdySettings(
259 host_port_pair_, spdy_settings_to_set_); 259 host_port_pair_, spdy_settings_to_set_);
260 } 260 }
261 261
262 EXPECT_FALSE(spdy_session_pool->HasSession(host_port_proxy_pair_)); 262 EXPECT_FALSE(spdy_session_pool->HasSession(host_port_proxy_pair_));
263 session_ = spdy_session_pool->Get(host_port_proxy_pair_, BoundNetLog()); 263 session_ = spdy_session_pool->Get(host_port_proxy_pair_, BoundNetLog());
264 EXPECT_TRUE(spdy_session_pool->HasSession(host_port_proxy_pair_)); 264 EXPECT_TRUE(spdy_session_pool->HasSession(host_port_proxy_pair_));
265 transport_params_ = new TransportSocketParams(host_port_pair_, MEDIUM, 265 transport_params_ = new TransportSocketParams(host_port_pair_, MEDIUM,
266 GURL(), false, false); 266 GURL(), false, false);
267 TestOldCompletionCallback callback; 267 TestOldCompletionCallback callback;
268 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); 268 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 EXPECT_EQ(OK, events[7].result); 602 EXPECT_EQ(OK, events[7].result);
603 603
604 // EOF close SPDY session. 604 // EOF close SPDY session.
605 EXPECT_TRUE(!http_session_->spdy_session_pool()->HasSession( 605 EXPECT_TRUE(!http_session_->spdy_session_pool()->HasSession(
606 host_port_proxy_pair_)); 606 host_port_proxy_pair_));
607 EXPECT_TRUE(data()->at_read_eof()); 607 EXPECT_TRUE(data()->at_read_eof());
608 EXPECT_TRUE(data()->at_write_eof()); 608 EXPECT_TRUE(data()->at_write_eof());
609 } 609 }
610 610
611 } // namespace net 611 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698