| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/crypto/quic_crypto_client_config.h" |
| 6 | 6 |
| 7 #include "net/quic/crypto/proof_verifier.h" | 7 #include "net/quic/crypto/proof_verifier.h" |
| 8 #include "net/quic/quic_server_id.h" | 8 #include "net/quic/quic_server_id.h" |
| 9 #include "net/quic/test_tools/mock_random.h" | 9 #include "net/quic/test_tools/mock_random.h" |
| 10 #include "net/quic/test_tools/quic_test_utils.h" | 10 #include "net/quic/test_tools/quic_test_utils.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 MockRandom rand; | 115 MockRandom rand; |
| 116 CryptoHandshakeMessage chlo; | 116 CryptoHandshakeMessage chlo; |
| 117 QuicServerId server_id("www.google.com", 80, false, PRIVACY_MODE_DISABLED); | 117 QuicServerId server_id("www.google.com", 80, false, PRIVACY_MODE_DISABLED); |
| 118 config.FillClientHello(server_id, | 118 config.FillClientHello(server_id, |
| 119 kConnectionId, | 119 kConnectionId, |
| 120 QuicVersionMax(), | 120 QuicVersionMax(), |
| 121 kInitialFlowControlWindow, | 121 kInitialFlowControlWindow, |
| 122 &state, | 122 &state, |
| 123 QuicWallTime::Zero(), | 123 QuicWallTime::Zero(), |
| 124 &rand, | 124 &rand, |
| 125 NULL, // channel_id_key |
| 125 ¶ms, | 126 ¶ms, |
| 126 &chlo, | 127 &chlo, |
| 127 &error_details); | 128 &error_details); |
| 128 | 129 |
| 129 // Verify that certain QuicTags have been set correctly in the CHLO. | 130 // Verify that certain QuicTags have been set correctly in the CHLO. |
| 130 QuicTag cver; | 131 QuicTag cver; |
| 131 EXPECT_EQ(QUIC_NO_ERROR, chlo.GetUint32(kVER, &cver)); | 132 EXPECT_EQ(QUIC_NO_ERROR, chlo.GetUint32(kVER, &cver)); |
| 132 EXPECT_EQ(QuicVersionToQuicTag(QuicVersionMax()), cver); | 133 EXPECT_EQ(QuicVersionToQuicTag(QuicVersionMax()), cver); |
| 133 | 134 |
| 134 QuicTag ifcw; | 135 QuicTag ifcw; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 EXPECT_EQ(state, cleared_cache); | 256 EXPECT_EQ(state, cleared_cache); |
| 256 EXPECT_FALSE(cleared_cache->proof_valid()); | 257 EXPECT_FALSE(cleared_cache->proof_valid()); |
| 257 EXPECT_TRUE(cleared_cache->server_config().empty()); | 258 EXPECT_TRUE(cleared_cache->server_config().empty()); |
| 258 EXPECT_TRUE(cleared_cache->certs().empty()); | 259 EXPECT_TRUE(cleared_cache->certs().empty()); |
| 259 EXPECT_TRUE(cleared_cache->signature().empty()); | 260 EXPECT_TRUE(cleared_cache->signature().empty()); |
| 260 EXPECT_EQ(2u, cleared_cache->generation_counter()); | 261 EXPECT_EQ(2u, cleared_cache->generation_counter()); |
| 261 } | 262 } |
| 262 | 263 |
| 263 } // namespace test | 264 } // namespace test |
| 264 } // namespace net | 265 } // namespace net |
| OLD | NEW |