OLD | NEW |
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/quic/quic_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "net/base/capturing_net_log.h" | 10 #include "net/base/capturing_net_log.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { | 65 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { |
66 protected: | 66 protected: |
67 QuicClientSessionTest() | 67 QuicClientSessionTest() |
68 : writer_(new TestPacketWriter()), | 68 : writer_(new TestPacketWriter()), |
69 connection_( | 69 connection_( |
70 new PacketSavingConnection(false, SupportedVersions(GetParam()))), | 70 new PacketSavingConnection(false, SupportedVersions(GetParam()))), |
71 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL, | 71 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL, |
72 make_scoped_ptr((QuicServerInfo*)NULL), | 72 make_scoped_ptr((QuicServerInfo*)NULL), |
73 QuicSessionKey(kServerHostname, kServerPort, false, | 73 QuicSessionKey(kServerHostname, kServerPort, false, |
74 PRIVACY_MODE_DISABLED), | 74 kPrivacyModeDisabled), |
75 DefaultQuicConfig(), &crypto_config_, &net_log_) { | 75 DefaultQuicConfig(), &crypto_config_, &net_log_) { |
76 session_.config()->SetDefaults(); | 76 session_.config()->SetDefaults(); |
77 crypto_config_.SetDefaults(); | 77 crypto_config_.SetDefaults(); |
78 } | 78 } |
79 | 79 |
80 virtual void TearDown() OVERRIDE { | 80 virtual void TearDown() OVERRIDE { |
81 session_.CloseSessionOnError(ERR_ABORTED); | 81 session_.CloseSessionOnError(ERR_ABORTED); |
82 } | 82 } |
83 | 83 |
84 scoped_ptr<DatagramClientSocket> GetSocket() { | 84 scoped_ptr<DatagramClientSocket> GetSocket() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // After receiving a GoAway, I should no longer be able to create outgoing | 162 // After receiving a GoAway, I should no longer be able to create outgoing |
163 // streams. | 163 // streams. |
164 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); | 164 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); |
165 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); | 165 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); |
166 } | 166 } |
167 | 167 |
168 } // namespace | 168 } // namespace |
169 } // namespace test | 169 } // namespace test |
170 } // namespace net | 170 } // namespace net |
OLD | NEW |