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

Side by Side Diff: net/quic/reliable_quic_stream_test.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.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/quic/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "net/quic/quic_ack_notifier.h" 7 #include "net/quic/quic_ack_notifier.h"
8 #include "net/quic/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 #include "net/quic/quic_utils.h" 9 #include "net/quic/quic_utils.h"
10 #include "net/quic/quic_write_blocked_list.h" 10 #include "net/quic/quic_write_blocked_list.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 supported_versions_ = versions; 109 supported_versions_ = versions;
110 } 110 }
111 111
112 void Initialize(bool stream_should_process_data) { 112 void Initialize(bool stream_should_process_data) {
113 connection_ = 113 connection_ =
114 new StrictMock<MockConnection>(kIsServer, supported_versions_); 114 new StrictMock<MockConnection>(kIsServer, supported_versions_);
115 session_.reset(new StrictMock<MockSession>(connection_)); 115 session_.reset(new StrictMock<MockSession>(connection_));
116 116
117 // New streams rely on having the peer's flow control receive window 117 // New streams rely on having the peer's flow control receive window
118 // negotiated in the config. 118 // negotiated in the config.
119 QuicConfigPeer::SetReceivedInitialFlowControlWindow(
120 session_->config(), initial_flow_control_window_bytes_);
121 QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( 119 QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow(
122 session_->config(), initial_flow_control_window_bytes_); 120 session_->config(), initial_flow_control_window_bytes_);
123 121
124 stream_.reset(new TestStream(kHeadersStreamId, session_.get(), 122 stream_.reset(new TestStream(kHeadersStreamId, session_.get(),
125 stream_should_process_data)); 123 stream_should_process_data));
126 write_blocked_list_ = 124 write_blocked_list_ =
127 QuicSessionPeer::GetWriteBlockedStreams(session_.get()); 125 QuicSessionPeer::GetWriteBlockedStreams(session_.get());
128 } 126 }
129 127
130 bool fin_sent() { return ReliableQuicStreamPeer::FinSent(stream_.get()); } 128 bool fin_sent() { return ReliableQuicStreamPeer::FinSent(stream_.get()); }
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 642
645 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); 643 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());
646 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); 644 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234);
647 stream_->OnStreamReset(rst_frame); 645 stream_->OnStreamReset(rst_frame);
648 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); 646 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
649 } 647 }
650 648
651 } // namespace 649 } // namespace
652 } // namespace test 650 } // namespace test
653 } // namespace net 651 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698