| OLD | NEW |
| 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 <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 EXPECT_EQ(1u, messages_moved.first); | 377 EXPECT_EQ(1u, messages_moved.first); |
| 378 EXPECT_EQ(1u, messages_moved.second); | 378 EXPECT_EQ(1u, messages_moved.second); |
| 379 EXPECT_TRUE(client_stream()->handshake_confirmed()); | 379 EXPECT_TRUE(client_stream()->handshake_confirmed()); |
| 380 EXPECT_TRUE(server_stream()->handshake_confirmed()); | 380 EXPECT_TRUE(server_stream()->handshake_confirmed()); |
| 381 } else { | 381 } else { |
| 382 CryptoTestUtils::CommunicateHandshakeMessages( | 382 CryptoTestUtils::CommunicateHandshakeMessages( |
| 383 client_connection_, client_stream(), server_connection_, | 383 client_connection_, client_stream(), server_connection_, |
| 384 server_stream()); | 384 server_stream()); |
| 385 } | 385 } |
| 386 | 386 |
| 387 if (AsyncStrikeRegisterVerification()) { | 387 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); |
| 388 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); | |
| 389 } else { | |
| 390 EXPECT_EQ(2, client_stream()->num_sent_client_hellos()); | |
| 391 } | |
| 392 } | 388 } |
| 393 | 389 |
| 394 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { | 390 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { |
| 395 FLAGS_quic_require_fix = false; | 391 FLAGS_quic_require_fix = false; |
| 396 Initialize(); | 392 Initialize(); |
| 397 CompleteCryptoHandshake(); | 393 CompleteCryptoHandshake(); |
| 398 EXPECT_CALL( | 394 EXPECT_CALL( |
| 399 *server_connection_, | 395 *server_connection_, |
| 400 CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _, _)); | 396 CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _, _)); |
| 401 message_.set_tag(kCHLO); | 397 message_.set_tag(kCHLO); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE); | 523 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE); |
| 528 | 524 |
| 529 // The outstanding nonce verification RPC now completes. | 525 // The outstanding nonce verification RPC now completes. |
| 530 strike_register_client_->RunPendingVerifications(); | 526 strike_register_client_->RunPendingVerifications(); |
| 531 } | 527 } |
| 532 | 528 |
| 533 } // namespace | 529 } // namespace |
| 534 | 530 |
| 535 } // namespace test | 531 } // namespace test |
| 536 } // namespace net | 532 } // namespace net |
| OLD | NEW |