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

Side by Side Diff: net/quic/core/quic_crypto_client_stream_test.cc

Issue 2566943003: rel-note: automated rollback of internal change 138108562 (Closed)
Patch Set: Created 4 years 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 | « no previous file | net/quic/core/quic_flags_list.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/core/quic_crypto_client_stream.h" 5 #include "net/quic/core/quic_crypto_client_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h" 9 #include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h"
10 #include "net/quic/core/crypto/quic_decrypter.h" 10 #include "net/quic/core/crypto/quic_decrypter.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 // Make sure that the STK and SCFG are cached correctly. 224 // Make sure that the STK and SCFG are cached correctly.
225 EXPECT_EQ("xstk", state->source_address_token()); 225 EXPECT_EQ("xstk", state->source_address_token());
226 226
227 const string& cached_scfg = state->server_config(); 227 const string& cached_scfg = state->server_config();
228 test::CompareCharArraysWithHexError( 228 test::CompareCharArraysWithHexError(
229 "scfg", cached_scfg.data(), cached_scfg.length(), 229 "scfg", cached_scfg.data(), cached_scfg.length(),
230 reinterpret_cast<char*>(scfg), arraysize(scfg)); 230 reinterpret_cast<char*>(scfg), arraysize(scfg));
231 231
232 QuicStreamSequencer* sequencer = QuicStreamPeer::sequencer(stream()); 232 QuicStreamSequencer* sequencer = QuicStreamPeer::sequencer(stream());
233 EXPECT_NE(FLAGS_quic_release_crypto_stream_buffer, 233 EXPECT_NE(
234 QuicStreamSequencerPeer::IsUnderlyingBufferAllocated(sequencer)); 234 FLAGS_quic_release_crypto_stream_buffer &&
235 FLAGS_quic_reduce_sequencer_buffer_memory_life_time, // NOLINT
236 QuicStreamSequencerPeer::IsUnderlyingBufferAllocated(sequencer));
235 } 237 }
236 238
237 TEST_F(QuicCryptoClientStreamTest, ServerConfigUpdateWithCert) { 239 TEST_F(QuicCryptoClientStreamTest, ServerConfigUpdateWithCert) {
238 // Test that the crypto client stream can receive and use server config 240 // Test that the crypto client stream can receive and use server config
239 // updates with certificates after the connection has been established. 241 // updates with certificates after the connection has been established.
240 CompleteCryptoHandshake(); 242 CompleteCryptoHandshake();
241 243
242 // Build a server config update message with certificates 244 // Build a server config update message with certificates
243 QuicCryptoServerConfig crypto_config( 245 QuicCryptoServerConfig crypto_config(
244 QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(), 246 QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 client_state->GetNextServerDesignatedConnectionId(); 426 client_state->GetNextServerDesignatedConnectionId();
425 QuicConnectionId expected_id = 427 QuicConnectionId expected_id =
426 server_session_->connection()->random_generator()->RandUint64(); 428 server_session_->connection()->random_generator()->RandUint64();
427 EXPECT_EQ(expected_id, server_designated_id); 429 EXPECT_EQ(expected_id, server_designated_id);
428 EXPECT_FALSE(client_state->has_server_designated_connection_id()); 430 EXPECT_FALSE(client_state->has_server_designated_connection_id());
429 } 431 }
430 432
431 } // namespace 433 } // namespace
432 } // namespace test 434 } // namespace test
433 } // namespace net 435 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698