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

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

Issue 1548783002: Adding details to most quic connection close calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110540464
Patch Set: Created 5 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 | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 server_stream()); 371 server_stream());
372 } 372 }
373 373
374 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); 374 EXPECT_EQ(1, client_stream()->num_sent_client_hellos());
375 } 375 }
376 376
377 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { 377 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) {
378 FLAGS_quic_require_fix = false; 378 FLAGS_quic_require_fix = false;
379 Initialize(); 379 Initialize();
380 CompleteCryptoHandshake(); 380 CompleteCryptoHandshake();
381 EXPECT_CALL( 381 EXPECT_CALL(*server_connection_,
382 *server_connection_, 382 SendConnectionCloseWithDetails(
383 SendConnectionClose(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE)); 383 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _));
384 message_.set_tag(kCHLO); 384 message_.set_tag(kCHLO);
385 ConstructHandshakeMessage(); 385 ConstructHandshakeMessage();
386 server_stream()->OnStreamFrame( 386 server_stream()->OnStreamFrame(
387 QuicStreamFrame(kCryptoStreamId, /*fin=*/false, /*offset=*/0, 387 QuicStreamFrame(kCryptoStreamId, /*fin=*/false, /*offset=*/0,
388 message_data_->AsStringPiece())); 388 message_data_->AsStringPiece()));
389 } 389 }
390 390
391 TEST_P(QuicCryptoServerStreamTest, BadMessageType) { 391 TEST_P(QuicCryptoServerStreamTest, BadMessageType) {
392 FLAGS_quic_require_fix = false; 392 FLAGS_quic_require_fix = false;
393 Initialize(); 393 Initialize();
394 394
395 message_.set_tag(kSHLO); 395 message_.set_tag(kSHLO);
396 ConstructHandshakeMessage(); 396 ConstructHandshakeMessage();
397 EXPECT_CALL(*server_connection_, 397 EXPECT_CALL(*server_connection_, SendConnectionCloseWithDetails(
398 SendConnectionClose(QUIC_INVALID_CRYPTO_MESSAGE_TYPE)); 398 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, _));
399 server_stream()->OnStreamFrame( 399 server_stream()->OnStreamFrame(
400 QuicStreamFrame(kCryptoStreamId, /*fin=*/false, /*offset=*/0, 400 QuicStreamFrame(kCryptoStreamId, /*fin=*/false, /*offset=*/0,
401 message_data_->AsStringPiece())); 401 message_data_->AsStringPiece()));
402 } 402 }
403 403
404 TEST_P(QuicCryptoServerStreamTest, ChannelID) { 404 TEST_P(QuicCryptoServerStreamTest, ChannelID) {
405 Initialize(); 405 Initialize();
406 406
407 client_options_.channel_id_enabled = true; 407 client_options_.channel_id_enabled = true;
408 client_options_.channel_id_source_async = false; 408 client_options_.channel_id_source_async = false;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 /*from_peer=*/true); 511 /*from_peer=*/true);
512 512
513 // The outstanding nonce verification RPC now completes. 513 // The outstanding nonce verification RPC now completes.
514 strike_register_client_->RunPendingVerifications(); 514 strike_register_client_->RunPendingVerifications();
515 } 515 }
516 516
517 } // namespace 517 } // namespace
518 518
519 } // namespace test 519 } // namespace test
520 } // namespace net 520 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698