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

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

Issue 215023002: Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/quic_spdy_client_stream_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 "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 17 matching lines...) Expand all
28 const uint16 kPort = 80; 28 const uint16 kPort = 80;
29 29
30 class ToolsQuicClientSessionTest 30 class ToolsQuicClientSessionTest
31 : public ::testing::TestWithParam<QuicVersion> { 31 : public ::testing::TestWithParam<QuicVersion> {
32 protected: 32 protected:
33 ToolsQuicClientSessionTest() 33 ToolsQuicClientSessionTest()
34 : connection_(new PacketSavingConnection(false, 34 : connection_(new PacketSavingConnection(false,
35 SupportedVersions(GetParam()))) { 35 SupportedVersions(GetParam()))) {
36 crypto_config_.SetDefaults(); 36 crypto_config_.SetDefaults();
37 session_.reset(new QuicClientSession( 37 session_.reset(new QuicClientSession(
38 QuicSessionKey(kServerHostname, kPort, false, kPrivacyModeDisabled), 38 QuicSessionKey(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED),
39 DefaultQuicConfig(), connection_, &crypto_config_)); 39 DefaultQuicConfig(), connection_, &crypto_config_));
40 session_->config()->SetDefaults(); 40 session_->config()->SetDefaults();
41 } 41 }
42 42
43 void CompleteCryptoHandshake() { 43 void CompleteCryptoHandshake() {
44 ASSERT_TRUE(session_->CryptoConnect()); 44 ASSERT_TRUE(session_->CryptoConnect());
45 CryptoTestUtils::HandshakeWithFakeServer( 45 CryptoTestUtils::HandshakeWithFakeServer(
46 connection_, session_->GetCryptoStream()); 46 connection_, session_->GetCryptoStream());
47 } 47 }
48 48
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // After receiving a GoAway, I should no longer be able to create outgoing 81 // After receiving a GoAway, I should no longer be able to create outgoing
82 // streams. 82 // streams.
83 session_->OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 83 session_->OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
84 EXPECT_EQ(NULL, session_->CreateOutgoingDataStream()); 84 EXPECT_EQ(NULL, session_->CreateOutgoingDataStream());
85 } 85 }
86 86
87 } // namespace 87 } // namespace
88 } // namespace test 88 } // namespace test
89 } // namespace tools 89 } // namespace tools
90 } // namespace net 90 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/quic_spdy_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698