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

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

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" Created 4 years, 7 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_packet_printer_bin.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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 QuicPacketCreatorPeer::GetEncryptionLevel( 168 QuicPacketCreatorPeer::GetEncryptionLevel(
169 QuicConnectionPeer::GetPacketCreator(connection_))); 169 QuicConnectionPeer::GetPacketCreator(connection_)));
170 // Verify that no new streams may be created. 170 // Verify that no new streams may be created.
171 EXPECT_TRUE(session_->CreateOutgoingDynamicStream(kDefaultPriority) == 171 EXPECT_TRUE(session_->CreateOutgoingDynamicStream(kDefaultPriority) ==
172 nullptr); 172 nullptr);
173 // Verify that no data may be send on existing streams. 173 // Verify that no data may be send on existing streams.
174 char data[] = "hello world"; 174 char data[] = "hello world";
175 struct iovec iov = {data, arraysize(data)}; 175 struct iovec iov = {data, arraysize(data)};
176 QuicIOVector iovector(&iov, 1, iov.iov_len); 176 QuicIOVector iovector(&iov, 1, iov.iov_len);
177 QuicConsumedData consumed = 177 QuicConsumedData consumed =
178 session_->WritevData(stream->id(), iovector, 0, false, nullptr); 178 session_->WritevData(stream, stream->id(), iovector, 0, false, nullptr);
179 EXPECT_FALSE(consumed.fin_consumed); 179 EXPECT_FALSE(consumed.fin_consumed);
180 EXPECT_EQ(0u, consumed.bytes_consumed); 180 EXPECT_EQ(0u, consumed.bytes_consumed);
181 } 181 }
182 182
183 TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) { 183 TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) {
184 EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber()); 184 EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber());
185 185
186 session_->config()->SetMaxStreamsPerConnection(1, 1); 186 session_->config()->SetMaxStreamsPerConnection(1, 1);
187 187
188 // Initialize crypto before the client session will create a stream. 188 // Initialize crypto before the client session will create a stream.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 QuicClientPromisedInfo* promised = 510 QuicClientPromisedInfo* promised =
511 session_->GetPromisedById(promised_stream_id_); 511 session_->GetPromisedById(promised_stream_id_);
512 EXPECT_NE(promised, nullptr); 512 EXPECT_NE(promised, nullptr);
513 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); 513 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
514 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); 514 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr);
515 } 515 }
516 516
517 } // namespace 517 } // namespace
518 } // namespace test 518 } // namespace test
519 } // namespace net 519 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_packet_printer_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698