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

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

Issue 393953009: Moving the work currently done in the QuicSession constructor to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return ""; 79 return "";
80 } 80 }
81 }; 81 };
82 82
83 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { 83 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
84 protected: 84 protected:
85 QuicClientSessionTest() 85 QuicClientSessionTest()
86 : writer_(new TestPacketWriter(GetParam())), 86 : writer_(new TestPacketWriter(GetParam())),
87 connection_( 87 connection_(
88 new PacketSavingConnection(false, SupportedVersions(GetParam()))), 88 new PacketSavingConnection(false, SupportedVersions(GetParam()))),
89 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL, 89 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL,
90 make_scoped_ptr((QuicServerInfo*)NULL), 90 make_scoped_ptr((QuicServerInfo*)NULL), DefaultQuicConfig(),
91 QuicServerId(kServerHostname, kServerPort, false,
92 PRIVACY_MODE_DISABLED),
93 DefaultQuicConfig(), &crypto_config_,
94 base::MessageLoop::current()->message_loop_proxy().get(), 91 base::MessageLoop::current()->message_loop_proxy().get(),
95 &net_log_) { 92 &net_log_) {
93 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, false,
94 PRIVACY_MODE_DISABLED),
95 &crypto_config_, NULL);
96 session_.config()->SetDefaults(); 96 session_.config()->SetDefaults();
97 crypto_config_.SetDefaults(); 97 crypto_config_.SetDefaults();
98 } 98 }
99 99
100 virtual void TearDown() OVERRIDE { 100 virtual void TearDown() OVERRIDE {
101 session_.CloseSessionOnError(ERR_ABORTED); 101 session_.CloseSessionOnError(ERR_ABORTED);
102 } 102 }
103 103
104 scoped_ptr<DatagramClientSocket> GetSocket() { 104 scoped_ptr<DatagramClientSocket> GetSocket() {
105 socket_factory_.AddSocketDataProvider(&socket_data_); 105 socket_factory_.AddSocketDataProvider(&socket_data_);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 EXPECT_TRUE(session_.CanPool("www.example.org")); 228 EXPECT_TRUE(session_.CanPool("www.example.org"));
229 EXPECT_TRUE(session_.CanPool("mail.example.org")); 229 EXPECT_TRUE(session_.CanPool("mail.example.org"));
230 EXPECT_FALSE(session_.CanPool("mail.example.com")); 230 EXPECT_FALSE(session_.CanPool("mail.example.com"));
231 EXPECT_FALSE(session_.CanPool("mail.google.com")); 231 EXPECT_FALSE(session_.CanPool("mail.google.com"));
232 } 232 }
233 233
234 } // namespace 234 } // namespace
235 } // namespace test 235 } // namespace test
236 } // namespace net 236 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698