| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Check the client state to make sure that it did not receive a | 292 // Check the client state to make sure that it did not receive a |
| 293 // server-designated connection id. | 293 // server-designated connection id. |
| 294 QuicCryptoClientConfig::CachedState* client_state = | 294 QuicCryptoClientConfig::CachedState* client_state = |
| 295 client_crypto_config_.LookupOrCreate(server_id_); | 295 client_crypto_config_.LookupOrCreate(server_id_); |
| 296 | 296 |
| 297 ASSERT_FALSE(client_state->has_server_designated_connection_id()); | 297 ASSERT_FALSE(client_state->has_server_designated_connection_id()); |
| 298 ASSERT_TRUE(client_state->IsComplete(QuicWallTime::FromUNIXSeconds(0))); | 298 ASSERT_TRUE(client_state->IsComplete(QuicWallTime::FromUNIXSeconds(0))); |
| 299 } | 299 } |
| 300 | 300 |
| 301 TEST_P(QuicCryptoServerStreamTest, ZeroRTT) { | 301 TEST_P(QuicCryptoServerStreamTest, ZeroRTT) { |
| 302 ValueRestore<bool> old_flag(&FLAGS_quic_require_handshake_confirmation, |
| 303 false); |
| 302 InitializeFakeClient(/* supports_stateless_rejects= */ false); | 304 InitializeFakeClient(/* supports_stateless_rejects= */ false); |
| 303 | 305 |
| 304 // Do a first handshake in order to prime the client config with the server's | 306 // Do a first handshake in order to prime the client config with the server's |
| 305 // information. | 307 // information. |
| 306 AdvanceHandshakeWithFakeClient(); | 308 AdvanceHandshakeWithFakeClient(); |
| 307 | 309 |
| 308 // Now do another handshake, hopefully in 0-RTT. | 310 // Now do another handshake, hopefully in 0-RTT. |
| 309 DVLOG(1) << "Resetting for 0-RTT handshake attempt"; | 311 DVLOG(1) << "Resetting for 0-RTT handshake attempt"; |
| 310 InitializeFakeClient(/* supports_stateless_rejects= */ false); | 312 InitializeFakeClient(/* supports_stateless_rejects= */ false); |
| 311 InitializeServer(); | 313 InitializeServer(); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 message_.Clear(); | 419 message_.Clear(); |
| 418 QuicConfig stateful_reject_config = DefaultQuicConfig(); | 420 QuicConfig stateful_reject_config = DefaultQuicConfig(); |
| 419 stateful_reject_config.ToHandshakeMessage(&message_); | 421 stateful_reject_config.ToHandshakeMessage(&message_); |
| 420 EXPECT_FALSE( | 422 EXPECT_FALSE( |
| 421 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_)); | 423 QuicCryptoServerStreamPeer::DoesPeerSupportStatelessRejects(message_)); |
| 422 } | 424 } |
| 423 | 425 |
| 424 } // namespace | 426 } // namespace |
| 425 } // namespace test | 427 } // namespace test |
| 426 } // namespace net | 428 } // namespace net |
| OLD | NEW |