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

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

Issue 211373004: Revert of Add PrivacyMode support to the QuicStreamFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.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_crypto_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000)); 138 client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
139 server_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000)); 139 server_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
140 140
141 QuicConfig client_config; 141 QuicConfig client_config;
142 client_config.SetDefaults(); 142 client_config.SetDefaults();
143 scoped_ptr<TestClientSession> client_session( 143 scoped_ptr<TestClientSession> client_session(
144 new TestClientSession(client_conn, client_config)); 144 new TestClientSession(client_conn, client_config));
145 QuicCryptoClientConfig client_crypto_config; 145 QuicCryptoClientConfig client_crypto_config;
146 client_crypto_config.SetDefaults(); 146 client_crypto_config.SetDefaults();
147 147
148 QuicSessionKey server_key(kServerHostname, kServerPort, false, 148 QuicSessionKey server_key(kServerHostname, kServerPort, false);
149 kPrivacyModeDisabled);
150 scoped_ptr<QuicCryptoClientStream> client(new QuicCryptoClientStream( 149 scoped_ptr<QuicCryptoClientStream> client(new QuicCryptoClientStream(
151 server_key, client_session.get(), NULL, &client_crypto_config)); 150 server_key, client_session.get(), NULL, &client_crypto_config));
152 client_session->SetCryptoStream(client.get()); 151 client_session->SetCryptoStream(client.get());
153 152
154 // Do a first handshake in order to prime the client config with the server's 153 // Do a first handshake in order to prime the client config with the server's
155 // information. 154 // information.
156 CHECK(client->CryptoConnect()); 155 CHECK(client->CryptoConnect());
157 CHECK_EQ(1u, client_conn->packets_.size()); 156 CHECK_EQ(1u, client_conn->packets_.size());
158 157
159 scoped_ptr<TestClientSession> server_session( 158 scoped_ptr<TestClientSession> server_session(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // CompleteCryptoHandshake verifies 258 // CompleteCryptoHandshake verifies
260 // stream_.crypto_negotiated_params().channel_id is correct. 259 // stream_.crypto_negotiated_params().channel_id is correct.
261 EXPECT_EQ(2, CompleteCryptoHandshake()); 260 EXPECT_EQ(2, CompleteCryptoHandshake());
262 EXPECT_TRUE(stream_.encryption_established()); 261 EXPECT_TRUE(stream_.encryption_established());
263 EXPECT_TRUE(stream_.handshake_confirmed()); 262 EXPECT_TRUE(stream_.handshake_confirmed());
264 } 263 }
265 264
266 } // namespace 265 } // namespace
267 } // namespace test 266 } // namespace test
268 } // namespace net 267 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698