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

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

Issue 20227003: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Land Recent QUIC changes Created 7 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.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_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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 TEST_F(QuicCryptoServerStreamTest, ConnectedAfterCHLO) { 117 TEST_F(QuicCryptoServerStreamTest, ConnectedAfterCHLO) {
118 if (!Aes128Gcm12Encrypter::IsSupported()) { 118 if (!Aes128Gcm12Encrypter::IsSupported()) {
119 LOG(INFO) << "AES GCM not supported. Test skipped."; 119 LOG(INFO) << "AES GCM not supported. Test skipped.";
120 return; 120 return;
121 } 121 }
122 122
123 // CompleteCryptoHandshake returns the number of client hellos sent. This 123 // CompleteCryptoHandshake returns the number of client hellos sent. This
124 // test should send: 124 // test should send:
125 // * One to get a source-address token. 125 // * One to get a source-address token and certificates.
126 // * One to complete the handshake. 126 // * One to complete the handshake.
127 // TODO(rtenneti): Until we set the crypto_config.SetProofVerifier to enable 127 // TODO(rtenneti): Until we set the crypto_config.SetProofVerifier to enable
128 // ProofVerifier in CryptoTestUtils::HandshakeWithFakeClient, we would not 128 // ProofVerifier in CryptoTestUtils::HandshakeWithFakeClient, we would not
129 // have sent the following client hello. 129 // have sent the following client hello.
130 // * One to get the server's certificates
131 EXPECT_EQ(2, CompleteCryptoHandshake()); 130 EXPECT_EQ(2, CompleteCryptoHandshake());
132 EXPECT_TRUE(stream_.encryption_established()); 131 EXPECT_TRUE(stream_.encryption_established());
133 EXPECT_TRUE(stream_.handshake_confirmed()); 132 EXPECT_TRUE(stream_.handshake_confirmed());
134 } 133 }
135 134
136 TEST_F(QuicCryptoServerStreamTest, ZeroRTT) { 135 TEST_F(QuicCryptoServerStreamTest, ZeroRTT) {
137 if (!Aes128Gcm12Encrypter::IsSupported()) { 136 if (!Aes128Gcm12Encrypter::IsSupported()) {
138 LOG(INFO) << "AES GCM not supported. Test skipped."; 137 LOG(INFO) << "AES GCM not supported. Test skipped.";
139 return; 138 return;
140 } 139 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // CompleteCryptoHandshake verifies 259 // CompleteCryptoHandshake verifies
261 // stream_.crypto_negotiated_params().channel_id is correct. 260 // stream_.crypto_negotiated_params().channel_id is correct.
262 EXPECT_EQ(2, CompleteCryptoHandshake()); 261 EXPECT_EQ(2, CompleteCryptoHandshake());
263 EXPECT_TRUE(stream_.encryption_established()); 262 EXPECT_TRUE(stream_.encryption_established());
264 EXPECT_TRUE(stream_.handshake_confirmed()); 263 EXPECT_TRUE(stream_.handshake_confirmed());
265 } 264 }
266 265
267 } // namespace 266 } // namespace
268 } // namespace test 267 } // namespace test
269 } // namespace net 268 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698