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

Side by Side Diff: net/tools/quic/quic_client_session_test.cc

Issue 1784903003: Remove FEC from send path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@114770052
Patch Set: Restore accidentally removed OnRttChanged call Created 4 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
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_simple_server_session_test.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/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 EXPECT_EQ(ENCRYPTION_NONE, 163 EXPECT_EQ(ENCRYPTION_NONE,
164 QuicPacketCreatorPeer::GetEncryptionLevel( 164 QuicPacketCreatorPeer::GetEncryptionLevel(
165 QuicConnectionPeer::GetPacketCreator(connection_))); 165 QuicConnectionPeer::GetPacketCreator(connection_)));
166 // Verify that no new streams may be created. 166 // Verify that no new streams may be created.
167 EXPECT_TRUE(session_->CreateOutgoingDynamicStream(kDefaultPriority) == 167 EXPECT_TRUE(session_->CreateOutgoingDynamicStream(kDefaultPriority) ==
168 nullptr); 168 nullptr);
169 // Verify that no data may be send on existing streams. 169 // Verify that no data may be send on existing streams.
170 char data[] = "hello world"; 170 char data[] = "hello world";
171 struct iovec iov = {data, arraysize(data)}; 171 struct iovec iov = {data, arraysize(data)};
172 QuicIOVector iovector(&iov, 1, iov.iov_len); 172 QuicIOVector iovector(&iov, 1, iov.iov_len);
173 QuicConsumedData consumed = session_->WritevData( 173 QuicConsumedData consumed =
174 stream->id(), iovector, 0, false, MAY_FEC_PROTECT, nullptr); 174 session_->WritevData(stream->id(), iovector, 0, false, nullptr);
175 EXPECT_FALSE(consumed.fin_consumed); 175 EXPECT_FALSE(consumed.fin_consumed);
176 EXPECT_EQ(0u, consumed.bytes_consumed); 176 EXPECT_EQ(0u, consumed.bytes_consumed);
177 } 177 }
178 178
179 TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) { 179 TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) {
180 EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber()); 180 EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber());
181 181
182 session_->config()->SetMaxStreamsPerConnection(1, 1); 182 session_->config()->SetMaxStreamsPerConnection(1, 1);
183 183
184 // Initialize crypto before the client session will create a stream. 184 // Initialize crypto before the client session will create a stream.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 QuicClientPromisedInfo* promised = 491 QuicClientPromisedInfo* promised =
492 session_->GetPromisedById(promised_stream_id_); 492 session_->GetPromisedById(promised_stream_id_);
493 EXPECT_NE(promised, nullptr); 493 EXPECT_NE(promised, nullptr);
494 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); 494 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
495 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); 495 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr);
496 } 496 }
497 497
498 } // namespace 498 } // namespace
499 } // namespace test 499 } // namespace test
500 } // namespace net 500 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_simple_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698