| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 EXPECT_EQ(1u, messages_moved.first); | 368 EXPECT_EQ(1u, messages_moved.first); |
| 369 EXPECT_EQ(1u, messages_moved.second); | 369 EXPECT_EQ(1u, messages_moved.second); |
| 370 EXPECT_TRUE(client_stream()->handshake_confirmed()); | 370 EXPECT_TRUE(client_stream()->handshake_confirmed()); |
| 371 EXPECT_TRUE(server_stream()->handshake_confirmed()); | 371 EXPECT_TRUE(server_stream()->handshake_confirmed()); |
| 372 } else { | 372 } else { |
| 373 CryptoTestUtils::CommunicateHandshakeMessages( | 373 CryptoTestUtils::CommunicateHandshakeMessages( |
| 374 client_connection_, client_stream(), server_connection_, | 374 client_connection_, client_stream(), server_connection_, |
| 375 server_stream()); | 375 server_stream()); |
| 376 } | 376 } |
| 377 | 377 |
| 378 if (FLAGS_require_strike_register_or_server_nonce && | 378 if (AsyncStrikeRegisterVerification()) { |
| 379 !AsyncStrikeRegisterVerification()) { | 379 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); |
| 380 } else { |
| 380 EXPECT_EQ(2, client_stream()->num_sent_client_hellos()); | 381 EXPECT_EQ(2, client_stream()->num_sent_client_hellos()); |
| 381 } else { | |
| 382 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); | |
| 383 } | 382 } |
| 384 } | 383 } |
| 385 | 384 |
| 386 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { | 385 TEST_P(QuicCryptoServerStreamTest, MessageAfterHandshake) { |
| 387 FLAGS_quic_require_fix = false; | 386 FLAGS_quic_require_fix = false; |
| 388 Initialize(); | 387 Initialize(); |
| 389 CompleteCryptoHandshake(); | 388 CompleteCryptoHandshake(); |
| 390 EXPECT_CALL(*server_connection_, | 389 EXPECT_CALL(*server_connection_, |
| 391 SendConnectionCloseWithDetails( | 390 SendConnectionCloseWithDetails( |
| 392 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _)); | 391 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, _)); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 QUIC_NO_ERROR, ConnectionCloseSource::FROM_PEER); | 518 QUIC_NO_ERROR, ConnectionCloseSource::FROM_PEER); |
| 520 | 519 |
| 521 // The outstanding nonce verification RPC now completes. | 520 // The outstanding nonce verification RPC now completes. |
| 522 strike_register_client_->RunPendingVerifications(); | 521 strike_register_client_->RunPendingVerifications(); |
| 523 } | 522 } |
| 524 | 523 |
| 525 } // namespace | 524 } // namespace |
| 526 | 525 |
| 527 } // namespace test | 526 } // namespace test |
| 528 } // namespace net | 527 } // namespace net |
| OLD | NEW |