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

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

Issue 12989038: [SPDY] Remove some setters in SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed DISALLOW_COPY_AND_ASSIGN again Created 7 years, 9 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/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "net/base/cert_test_util.h" 9 #include "net/base/cert_test_util.h"
10 #include "net/base/host_cache.h" 10 #include "net/base/host_cache.h"
11 #include "net/base/io_buffer.h" 11 #include "net/base/io_buffer.h"
12 #include "net/base/ip_endpoint.h" 12 #include "net/base/ip_endpoint.h"
13 #include "net/base/net_log_unittest.h" 13 #include "net/base/net_log_unittest.h"
14 #include "net/base/request_priority.h"
14 #include "net/base/test_data_directory.h" 15 #include "net/base/test_data_directory.h"
15 #include "net/base/test_data_stream.h" 16 #include "net/base/test_data_stream.h"
16 #include "net/spdy/spdy_io_buffer.h" 17 #include "net/spdy/spdy_io_buffer.h"
17 #include "net/spdy/spdy_session_pool.h" 18 #include "net/spdy/spdy_session_pool.h"
18 #include "net/spdy/spdy_session_test_util.h" 19 #include "net/spdy/spdy_session_test_util.h"
19 #include "net/spdy/spdy_stream.h" 20 #include "net/spdy/spdy_stream.h"
20 #include "net/spdy/spdy_stream_test_util.h" 21 #include "net/spdy/spdy_stream_test_util.h"
21 #include "net/spdy/spdy_test_util_common.h" 22 #include "net/spdy/spdy_test_util_common.h"
22 #include "net/spdy/spdy_test_util_spdy2.h" 23 #include "net/spdy/spdy_test_util_spdy2.h"
23 #include "testing/platform_test.h" 24 #include "testing/platform_test.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Give the session a SPDY2 framer. 290 // Give the session a SPDY2 framer.
290 session->buffered_spdy_framer_.reset(new BufferedSpdyFramer(2, false)); 291 session->buffered_spdy_framer_.reset(new BufferedSpdyFramer(2, false));
291 292
292 // Create the associated stream and add to active streams. 293 // Create the associated stream and add to active streams.
293 scoped_ptr<SpdyHeaderBlock> request_headers(new SpdyHeaderBlock); 294 scoped_ptr<SpdyHeaderBlock> request_headers(new SpdyHeaderBlock);
294 (*request_headers)["scheme"] = "http"; 295 (*request_headers)["scheme"] = "http";
295 (*request_headers)["host"] = "www.google.com"; 296 (*request_headers)["host"] = "www.google.com";
296 (*request_headers)["url"] = "/"; 297 (*request_headers)["url"] = "/";
297 298
298 scoped_refptr<SpdyStream> stream( 299 scoped_refptr<SpdyStream> stream(
299 new SpdyStream(session, false, session->net_log_)); 300 new SpdyStream(session, std::string(), DEFAULT_PRIORITY,
301 kSpdyStreamInitialWindowSize,
302 kSpdyStreamInitialWindowSize,
303 false, session->net_log_));
300 stream->set_spdy_headers(request_headers.Pass()); 304 stream->set_spdy_headers(request_headers.Pass());
301 session->ActivateStream(stream); 305 session->ActivateStream(stream);
302 306
303 SpdyHeaderBlock headers; 307 SpdyHeaderBlock headers;
304 headers["url"] = "http://www.google.com/a.dat"; 308 headers["url"] = "http://www.google.com/a.dat";
305 session->OnSynStream(2, 1, 0, 0, true, false, headers); 309 session->OnSynStream(2, 1, 0, 0, true, false, headers);
306 310
307 // Verify that there is one unclaimed push stream. 311 // Verify that there is one unclaimed push stream.
308 EXPECT_EQ(1u, session->num_unclaimed_pushed_streams()); 312 EXPECT_EQ(1u, session->num_unclaimed_pushed_streams());
309 SpdySession::PushedStreamMap::iterator iter = 313 SpdySession::PushedStreamMap::iterator iter =
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 http_session_.get(), session.get(), test_host_port_pair_); 1981 http_session_.get(), session.get(), test_host_port_pair_);
1978 1982
1979 EXPECT_EQ(SpdySession::FLOW_CONTROL_NONE, session->flow_control_state()); 1983 EXPECT_EQ(SpdySession::FLOW_CONTROL_NONE, session->flow_control_state());
1980 EXPECT_EQ(kSpdyVersion2, session->buffered_spdy_framer_->protocol_version()); 1984 EXPECT_EQ(kSpdyVersion2, session->buffered_spdy_framer_->protocol_version());
1981 EXPECT_EQ(0, session->session_send_window_size_); 1985 EXPECT_EQ(0, session->session_send_window_size_);
1982 EXPECT_EQ(0, session->session_recv_window_size_); 1986 EXPECT_EQ(0, session->session_recv_window_size_);
1983 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); 1987 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_);
1984 } 1988 }
1985 1989
1986 } // namespace net 1990 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698