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

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

Issue 330333006: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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 "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
(...skipping 21 matching lines...) Expand all
32 : public ::testing::TestWithParam<QuicVersion> { 32 : public ::testing::TestWithParam<QuicVersion> {
33 protected: 33 protected:
34 ToolsQuicClientSessionTest() 34 ToolsQuicClientSessionTest()
35 : connection_(new PacketSavingConnection(false, 35 : connection_(new PacketSavingConnection(false,
36 SupportedVersions(GetParam()))) { 36 SupportedVersions(GetParam()))) {
37 crypto_config_.SetDefaults(); 37 crypto_config_.SetDefaults();
38 session_.reset(new QuicClientSession( 38 session_.reset(new QuicClientSession(
39 QuicServerId(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED), 39 QuicServerId(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED),
40 DefaultQuicConfig(), 40 DefaultQuicConfig(),
41 connection_, 41 connection_,
42 kInitialFlowControlWindowForTest,
43 &crypto_config_)); 42 &crypto_config_));
44 session_->config()->SetDefaults(); 43 session_->config()->SetDefaults();
45 } 44 }
46 45
47 void CompleteCryptoHandshake() { 46 void CompleteCryptoHandshake() {
48 ASSERT_TRUE(session_->CryptoConnect()); 47 ASSERT_TRUE(session_->CryptoConnect());
49 CryptoTestUtils::HandshakeWithFakeServer( 48 CryptoTestUtils::HandshakeWithFakeServer(
50 connection_, session_->GetCryptoStream()); 49 connection_, session_->GetCryptoStream());
51 } 50 }
52 51
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // After receiving a GoAway, I should no longer be able to create outgoing 84 // After receiving a GoAway, I should no longer be able to create outgoing
86 // streams. 85 // streams.
87 session_->OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 86 session_->OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
88 EXPECT_EQ(NULL, session_->CreateOutgoingDataStream()); 87 EXPECT_EQ(NULL, session_->CreateOutgoingDataStream());
89 } 88 }
90 89
91 } // namespace 90 } // namespace
92 } // namespace test 91 } // namespace test
93 } // namespace tools 92 } // namespace tools
94 } // namespace net 93 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698