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

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

Issue 407193002: QUIC - undo the chromium specific changes from the following CL which (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_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/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 QuicVersion version_; 65 QuicVersion version_;
66 QuicPacketHeader header_; 66 QuicPacketHeader header_;
67 }; 67 };
68 68
69 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { 69 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
70 protected: 70 protected:
71 QuicClientSessionTest() 71 QuicClientSessionTest()
72 : writer_(new TestPacketWriter(GetParam())), 72 : writer_(new TestPacketWriter(GetParam())),
73 connection_( 73 connection_(
74 new PacketSavingConnection(false, SupportedVersions(GetParam()))), 74 new PacketSavingConnection(false, SupportedVersions(GetParam()))),
75 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, 75 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL,
76 make_scoped_ptr((QuicServerInfo*)NULL), DefaultQuicConfig(), 76 make_scoped_ptr((QuicServerInfo*)NULL),
77 QuicServerId(kServerHostname, kServerPort, false,
78 PRIVACY_MODE_DISABLED),
79 DefaultQuicConfig(), &crypto_config_,
77 base::MessageLoop::current()->message_loop_proxy().get(), 80 base::MessageLoop::current()->message_loop_proxy().get(),
78 &net_log_) { 81 &net_log_) {
79 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, false, 82 session_.InitializeSession();
80 PRIVACY_MODE_DISABLED),
81 &crypto_config_, NULL);
82 session_.config()->SetDefaults(); 83 session_.config()->SetDefaults();
83 crypto_config_.SetDefaults(); 84 crypto_config_.SetDefaults();
84 } 85 }
85 86
86 virtual void TearDown() OVERRIDE { 87 virtual void TearDown() OVERRIDE {
87 session_.CloseSessionOnError(ERR_ABORTED); 88 session_.CloseSessionOnError(ERR_ABORTED);
88 } 89 }
89 90
90 scoped_ptr<DatagramClientSocket> GetSocket() { 91 scoped_ptr<DatagramClientSocket> GetSocket() {
91 socket_factory_.AddSocketDataProvider(&socket_data_); 92 socket_factory_.AddSocketDataProvider(&socket_data_);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 214
214 EXPECT_TRUE(session_.CanPool("www.example.org")); 215 EXPECT_TRUE(session_.CanPool("www.example.org"));
215 EXPECT_TRUE(session_.CanPool("mail.example.org")); 216 EXPECT_TRUE(session_.CanPool("mail.example.org"));
216 EXPECT_FALSE(session_.CanPool("mail.example.com")); 217 EXPECT_FALSE(session_.CanPool("mail.example.com"));
217 EXPECT_FALSE(session_.CanPool("mail.google.com")); 218 EXPECT_FALSE(session_.CanPool("mail.google.com"));
218 } 219 }
219 220
220 } // namespace 221 } // namespace
221 } // namespace test 222 } // namespace test
222 } // namespace net 223 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698