| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } else { | 420 } else { |
| 421 CryptoTestUtils::CommunicateHandshakeMessages( | 421 CryptoTestUtils::CommunicateHandshakeMessages( |
| 422 client_connection_, client_stream(), server_connection_, | 422 client_connection_, client_stream(), server_connection_, |
| 423 server_stream()); | 423 server_stream()); |
| 424 } | 424 } |
| 425 | 425 |
| 426 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); | 426 EXPECT_EQ(1, client_stream()->num_sent_client_hellos()); |
| 427 } | 427 } |
| 428 | 428 |
| 429 TEST_P(QuicCryptoServerStreamTest, FailByPolicy) { | 429 TEST_P(QuicCryptoServerStreamTest, FailByPolicy) { |
| 430 FLAGS_quic_enable_chlo_policy = true; | |
| 431 FLAGS_quic_disable_pre_30 = true; | 430 FLAGS_quic_disable_pre_30 = true; |
| 432 FLAGS_quic_deprecate_kfixd = true; | 431 FLAGS_quic_deprecate_kfixd = true; |
| 433 Initialize(); | 432 Initialize(); |
| 434 InitializeFakeClient(/* supports_stateless_rejects= */ false); | 433 InitializeFakeClient(/* supports_stateless_rejects= */ false); |
| 435 | 434 |
| 436 EXPECT_CALL(*server_session_->helper(), CanAcceptClientHello(_, _, _)) | 435 EXPECT_CALL(*server_session_->helper(), CanAcceptClientHello(_, _, _)) |
| 437 .WillOnce(testing::Return(false)); | 436 .WillOnce(testing::Return(false)); |
| 438 EXPECT_CALL(*server_connection_, | 437 EXPECT_CALL(*server_connection_, |
| 439 CloseConnection(QUIC_HANDSHAKE_FAILED, _, _)); | 438 CloseConnection(QUIC_HANDSHAKE_FAILED, _, _)); |
| 440 | 439 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE); | 602 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE); |
| 604 | 603 |
| 605 // The outstanding nonce verification RPC now completes. | 604 // The outstanding nonce verification RPC now completes. |
| 606 strike_register_client_->RunPendingVerifications(); | 605 strike_register_client_->RunPendingVerifications(); |
| 607 } | 606 } |
| 608 | 607 |
| 609 } // namespace | 608 } // namespace |
| 610 | 609 |
| 611 } // namespace test | 610 } // namespace test |
| 612 } // namespace net | 611 } // namespace net |
| OLD | NEW |