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

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

Issue 1437023002: Landing Recent QUIC changes until 2015-11-09 20:32 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_connection.h » ('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_chromium_client_session.h" 5 #include "net/quic/quic_chromium_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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 scoped_ptr<DatagramClientSocket> GetSocket() { 84 scoped_ptr<DatagramClientSocket> GetSocket() {
85 socket_factory_.AddSocketDataProvider(&socket_data_); 85 socket_factory_.AddSocketDataProvider(&socket_data_);
86 return socket_factory_.CreateDatagramClientSocket( 86 return socket_factory_.CreateDatagramClientSocket(
87 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), &net_log_, 87 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), &net_log_,
88 NetLog::Source()); 88 NetLog::Source());
89 } 89 }
90 90
91 void CompleteCryptoHandshake() { 91 void CompleteCryptoHandshake() {
92 ASSERT_EQ(ERR_IO_PENDING, 92 ASSERT_EQ(ERR_IO_PENDING,
93 session_.CryptoConnect(false, callback_.callback())); 93 session_.CryptoConnect(false, callback_.callback()));
94 CryptoTestUtils::HandshakeWithFakeServer(&helper_, connection_, 94 CryptoTestUtils::FakeServerOptions server_options;
95 session_.GetCryptoStream()); 95 CryptoTestUtils::HandshakeWithFakeServer(
96 &helper_, connection_, session_.GetCryptoStream(), server_options);
96 ASSERT_EQ(OK, callback_.WaitForResult()); 97 ASSERT_EQ(OK, callback_.WaitForResult());
97 } 98 }
98 99
99 MockConnectionHelper helper_; 100 MockConnectionHelper helper_;
100 QuicCryptoClientConfig crypto_config_; 101 QuicCryptoClientConfig crypto_config_;
101 PacketSavingConnection* connection_; 102 PacketSavingConnection* connection_;
102 TestNetLog net_log_; 103 TestNetLog net_log_;
103 MockClientSocketFactory socket_factory_; 104 MockClientSocketFactory socket_factory_;
104 StaticSocketDataProvider socket_data_; 105 StaticSocketDataProvider socket_data_;
105 TransportSecurityState transport_security_state_; 106 TransportSecurityState transport_security_state_;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 session_.OnProofVerifyDetailsAvailable(details); 266 session_.OnProofVerifyDetailsAvailable(details);
266 QuicChromiumClientSessionPeer::SetHostname(&session_, "www.example.org"); 267 QuicChromiumClientSessionPeer::SetHostname(&session_, "www.example.org");
267 QuicChromiumClientSessionPeer::SetChannelIDSent(&session_, true); 268 QuicChromiumClientSessionPeer::SetChannelIDSent(&session_, true);
268 269
269 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); 270 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED));
270 } 271 }
271 272
272 } // namespace 273 } // namespace
273 } // namespace test 274 } // namespace test
274 } // namespace net 275 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698