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

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

Issue 215023002: Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 149 PRIVACY_MODE_DISABLED);
150 scoped_ptr<QuicCryptoClientStream> client(new QuicCryptoClientStream( 150 scoped_ptr<QuicCryptoClientStream> client(new QuicCryptoClientStream(
151 server_key, client_session.get(), NULL, &client_crypto_config)); 151 server_key, client_session.get(), NULL, &client_crypto_config));
152 client_session->SetCryptoStream(client.get()); 152 client_session->SetCryptoStream(client.get());
153 153
154 // Do a first handshake in order to prime the client config with the server's 154 // Do a first handshake in order to prime the client config with the server's
155 // information. 155 // information.
156 CHECK(client->CryptoConnect()); 156 CHECK(client->CryptoConnect());
157 CHECK_EQ(1u, client_conn->packets_.size()); 157 CHECK_EQ(1u, client_conn->packets_.size());
158 158
159 scoped_ptr<TestClientSession> server_session( 159 scoped_ptr<TestClientSession> server_session(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // CompleteCryptoHandshake verifies 259 // CompleteCryptoHandshake verifies
260 // stream_.crypto_negotiated_params().channel_id is correct. 260 // stream_.crypto_negotiated_params().channel_id is correct.
261 EXPECT_EQ(2, CompleteCryptoHandshake()); 261 EXPECT_EQ(2, CompleteCryptoHandshake());
262 EXPECT_TRUE(stream_.encryption_established()); 262 EXPECT_TRUE(stream_.encryption_established());
263 EXPECT_TRUE(stream_.handshake_confirmed()); 263 EXPECT_TRUE(stream_.handshake_confirmed());
264 } 264 }
265 265
266 } // namespace 266 } // namespace
267 } // namespace test 267 } // namespace test
268 } // namespace net 268 } // 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