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/base64.h" | 9 #include "base/base64.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 namespace { | 36 namespace { |
37 | 37 |
38 const char kServerHostname[] = "www.example.org"; | 38 const char kServerHostname[] = "www.example.org"; |
39 const uint16 kServerPort = 80; | 39 const uint16 kServerPort = 80; |
40 | 40 |
41 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { | 41 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { |
42 protected: | 42 protected: |
43 QuicClientSessionTest() | 43 QuicClientSessionTest() |
44 : connection_( | 44 : connection_( |
45 new PacketSavingConnection(false, SupportedVersions(GetParam()))), | 45 new PacketSavingConnection(false, SupportedVersions(GetParam()))), |
46 session_(connection_, GetSocket().Pass(), NULL, NULL, | 46 session_(connection_, GetSocket().Pass(), NULL, |
47 &transport_security_state_, | 47 &transport_security_state_, |
48 make_scoped_ptr((QuicServerInfo*)NULL), | 48 make_scoped_ptr((QuicServerInfo*)NULL), DefaultQuicConfig(), |
49 QuicServerId(kServerHostname, kServerPort, false, | |
50 PRIVACY_MODE_DISABLED), | |
51 DefaultQuicConfig(), &crypto_config_, | |
52 base::MessageLoop::current()->message_loop_proxy().get(), | 49 base::MessageLoop::current()->message_loop_proxy().get(), |
53 &net_log_) { | 50 &net_log_) { |
54 session_.InitializeSession(); | 51 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, false, |
| 52 PRIVACY_MODE_DISABLED), |
| 53 &crypto_config_, NULL); |
55 session_.config()->SetDefaults(); | 54 session_.config()->SetDefaults(); |
56 crypto_config_.SetDefaults(); | 55 crypto_config_.SetDefaults(); |
57 } | 56 } |
58 | 57 |
59 virtual void TearDown() OVERRIDE { | 58 virtual void TearDown() OVERRIDE { |
60 session_.CloseSessionOnError(ERR_ABORTED); | 59 session_.CloseSessionOnError(ERR_ABORTED); |
61 } | 60 } |
62 | 61 |
63 scoped_ptr<DatagramClientSocket> GetSocket() { | 62 scoped_ptr<DatagramClientSocket> GetSocket() { |
64 socket_factory_.AddSocketDataProvider(&socket_data_); | 63 socket_factory_.AddSocketDataProvider(&socket_data_); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 session_.OnProofVerifyDetailsAvailable(details); | 226 session_.OnProofVerifyDetailsAvailable(details); |
228 CompleteCryptoHandshake(); | 227 CompleteCryptoHandshake(); |
229 QuicClientSessionPeer::SetChannelIDSent(&session_, true); | 228 QuicClientSessionPeer::SetChannelIDSent(&session_, true); |
230 | 229 |
231 EXPECT_TRUE(session_.CanPool("mail.example.org")); | 230 EXPECT_TRUE(session_.CanPool("mail.example.org")); |
232 } | 231 } |
233 | 232 |
234 } // namespace | 233 } // namespace |
235 } // namespace test | 234 } // namespace test |
236 } // namespace net | 235 } // namespace net |
OLD | NEW |