| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 private: | 61 private: |
| 62 QuicPacketHeader header_; | 62 QuicPacketHeader header_; |
| 63 }; | 63 }; |
| 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, | 71 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL, |
| 72 make_scoped_ptr((QuicServerInfo*)NULL), NULL, | 72 make_scoped_ptr((QuicServerInfo*)NULL), |
| 73 QuicSessionKey(kServerHostname, kServerPort, false), | 73 QuicSessionKey(kServerHostname, kServerPort, false), |
| 74 DefaultQuicConfig(), &crypto_config_, &net_log_) { | 74 DefaultQuicConfig(), &crypto_config_, &net_log_) { |
| 75 session_.config()->SetDefaults(); | 75 session_.config()->SetDefaults(); |
| 76 crypto_config_.SetDefaults(); | 76 crypto_config_.SetDefaults(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 virtual void TearDown() OVERRIDE { | 79 virtual void TearDown() OVERRIDE { |
| 80 session_.CloseSessionOnError(ERR_ABORTED); | 80 session_.CloseSessionOnError(ERR_ABORTED); |
| 81 } | 81 } |
| 82 | 82 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 // After receiving a GoAway, I should no longer be able to create outgoing | 161 // After receiving a GoAway, I should no longer be able to create outgoing |
| 162 // streams. | 162 // streams. |
| 163 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); | 163 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); |
| 164 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); | 164 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace | 167 } // namespace |
| 168 } // namespace test | 168 } // namespace test |
| 169 } // namespace net | 169 } // namespace net |
| OLD | NEW |