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

Unified Diff: net/tools/quic/quic_client_session_test.cc

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client_session_test.cc
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc
index 82c20e60655586e0cda641744c8ace36fb48d0e7..b60833dab182b0f11ce02bf60e0872a0eb12952d 100644
--- a/net/tools/quic/quic_client_session_test.cc
+++ b/net/tools/quic/quic_client_session_test.cc
@@ -7,8 +7,8 @@
#include <vector>
#include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h"
-#include "net/quic/core/quic_flags.h"
#include "net/quic/core/spdy_utils.h"
+#include "net/quic/platform/api/quic_flags.h"
#include "net/quic/platform/api/quic_ptr_util.h"
#include "net/quic/platform/api/quic_socket_address.h"
#include "net/quic/platform/api/quic_str_cat.h"
@@ -102,8 +102,8 @@ class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
void CompleteCryptoHandshake(uint32_t server_max_incoming_streams) {
session_->CryptoConnect();
- QuicCryptoClientStream* stream =
- static_cast<QuicCryptoClientStream*>(session_->GetCryptoStream());
+ QuicCryptoClientStream* stream = static_cast<QuicCryptoClientStream*>(
+ session_->GetMutableCryptoStream());
crypto_test_utils::FakeServerOptions options;
QuicConfig config = DefaultQuicConfig();
config.SetMaxIncomingDynamicStreamsToSend(server_max_incoming_streams);
@@ -153,7 +153,7 @@ TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) {
CryptoHandshakeMessage rej;
crypto_test_utils::FillInDummyReject(&rej, /* stateless */ false);
EXPECT_TRUE(session_->IsEncryptionEstablished());
- session_->GetCryptoStream()->OnHandshakeMessage(rej);
+ session_->GetMutableCryptoStream()->OnHandshakeMessage(rej);
EXPECT_FALSE(session_->IsEncryptionEstablished());
EXPECT_EQ(ENCRYPTION_NONE,
QuicPacketCreatorPeer::GetEncryptionLevel(
@@ -166,7 +166,7 @@ TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) {
struct iovec iov = {data, arraysize(data)};
QuicIOVector iovector(&iov, 1, iov.iov_len);
QuicConsumedData consumed =
- session_->WritevData(stream, stream->id(), iovector, 0, false, nullptr);
+ session_->WritevData(stream, stream->id(), iovector, 0, NO_FIN, nullptr);
EXPECT_FALSE(consumed.fin_consumed);
EXPECT_EQ(0u, consumed.bytes_consumed);
}
@@ -174,15 +174,8 @@ TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) {
TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) {
EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber());
- if (GetParam() <= QUIC_VERSION_34) {
- session_->config()->SetMaxStreamsPerConnection(1, 1);
-
- // Initialize crypto before the client session will create a stream.
- CompleteCryptoHandshake();
- } else {
- const uint32_t kServerMaxIncomingStreams = 1;
- CompleteCryptoHandshake(kServerMaxIncomingStreams);
- }
+ const uint32_t kServerMaxIncomingStreams = 1;
+ CompleteCryptoHandshake(kServerMaxIncomingStreams);
QuicSpdyClientStream* stream =
session_->CreateOutgoingDynamicStream(kDefaultPriority);
@@ -201,15 +194,8 @@ TEST_P(QuicClientSessionTest, MaxNumStreamsWithNoFinOrRst) {
TEST_P(QuicClientSessionTest, MaxNumStreamsWithRst) {
EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(AnyNumber());
- if (GetParam() <= QUIC_VERSION_34) {
- session_->config()->SetMaxStreamsPerConnection(1, 1);
-
- // Initialize crypto before the client session will create a stream.
- CompleteCryptoHandshake();
- } else {
- const uint32_t kServerMaxIncomingStreams = 1;
- CompleteCryptoHandshake(kServerMaxIncomingStreams);
- }
+ const uint32_t kServerMaxIncomingStreams = 1;
+ CompleteCryptoHandshake(kServerMaxIncomingStreams);
QuicSpdyClientStream* stream =
session_->CreateOutgoingDynamicStream(kDefaultPriority);
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698