| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 EXPECT_EQ(1u, messages_moved.first); | 370 EXPECT_EQ(1u, messages_moved.first); |
| 371 EXPECT_EQ(1u, messages_moved.second); | 371 EXPECT_EQ(1u, messages_moved.second); |
| 372 EXPECT_TRUE(client_stream()->handshake_confirmed()); | 372 EXPECT_TRUE(client_stream()->handshake_confirmed()); |
| 373 EXPECT_TRUE(server_stream()->handshake_confirmed()); | 373 EXPECT_TRUE(server_stream()->handshake_confirmed()); |
| 374 } else { | 374 } else { |
| 375 CryptoTestUtils::CommunicateHandshakeMessages( | 375 CryptoTestUtils::CommunicateHandshakeMessages( |
| 376 client_connection_, client_stream(), server_connection_, | 376 client_connection_, client_stream(), server_connection_, |
| 377 server_stream()); | 377 server_stream()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); | 380 if (FLAGS_require_strike_register_or_server_nonce && |
| 381 !AsyncStrikeRegisterVerification()) { |
| 382 EXPECT_EQ(2, client_stream()->num_sent_client_hellos()); |
| 383 } else { |
| 384 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); |
| 385 } |
| 381 } | 386 } |
| 382 | 387 |
| 383 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { | 388 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { |
| 384 FLAGS_quic_require_fix = false; | 389 FLAGS_quic_require_fix = false; |
| 385 Initialize(); | 390 Initialize(); |
| 386 CompleteCryptoHandshake(); | 391 CompleteCryptoHandshake(); |
| 387 EXPECT_CALL(*server_connection_, | 392 EXPECT_CALL(*server_connection_, |
| 388 SendConnectionCloseWithDetails( | 393 SendConnectionCloseWithDetails( |
| 389 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _)); | 394 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _)); |
| 390 message_.set_tag(kCHLO); | 395 message_.set_tag(kCHLO); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 /*from_peer=*/true); | 522 /*from_peer=*/true); |
| 518 | 523 |
| 519 // The outstanding nonce verification RPC now completes. | 524 // The outstanding nonce verification RPC now completes. |
| 520 strike_register_client_->RunPendingVerifications(); | 525 strike_register_client_->RunPendingVerifications(); |
| 521 } | 526 } |
| 522 | 527 |
| 523 } // namespace | 528 } // namespace |
| 524 | 529 |
| 525 } // namespace test | 530 } // namespace test |
| 526 } // namespace net | 531 } // namespace net |
| OLD | NEW |