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_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" | 8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" |
9 #include "net/quic/crypto/quic_decrypter.h" | 9 #include "net/quic/crypto/quic_decrypter.h" |
10 #include "net/quic/crypto/quic_encrypter.h" | 10 #include "net/quic/crypto/quic_encrypter.h" |
11 #include "net/quic/quic_flags.h" | 11 #include "net/quic/quic_flags.h" |
12 #include "net/quic/quic_protocol.h" | 12 #include "net/quic/quic_protocol.h" |
13 #include "net/quic/quic_server_id.h" | 13 #include "net/quic/quic_server_id.h" |
14 #include "net/quic/quic_utils.h" | 14 #include "net/quic/quic_utils.h" |
15 #include "net/quic/test_tools/crypto_test_utils.h" | 15 #include "net/quic/test_tools/crypto_test_utils.h" |
16 #include "net/quic/test_tools/quic_test_utils.h" | 16 #include "net/quic/test_tools/quic_test_utils.h" |
17 #include "net/quic/test_tools/simple_quic_framer.h" | 17 #include "net/quic/test_tools/simple_quic_framer.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using std::string; | 21 using std::string; |
22 using std::vector; | 22 using std::vector; |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 namespace test { | 25 namespace test { |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kServerHostname[] = "test.example.com"; | 28 const char kServerHostname[] = "test.example.com"; |
29 const uint16 kServerPort = 443; | 29 const uint16_t kServerPort = 443; |
30 | 30 |
31 class QuicCryptoClientStreamTest : public ::testing::Test { | 31 class QuicCryptoClientStreamTest : public ::testing::Test { |
32 public: | 32 public: |
33 QuicCryptoClientStreamTest() | 33 QuicCryptoClientStreamTest() |
34 : server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED), | 34 : server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED), |
35 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) { | 35 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) { |
36 CreateConnection(); | 36 CreateConnection(); |
37 } | 37 } |
38 | 38 |
39 void CreateConnection() { | 39 void CreateConnection() { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 client_state->GetNextServerDesignatedConnectionId(); | 339 client_state->GetNextServerDesignatedConnectionId(); |
340 QuicConnectionId expected_id = | 340 QuicConnectionId expected_id = |
341 server_session_->connection()->random_generator()->RandUint64(); | 341 server_session_->connection()->random_generator()->RandUint64(); |
342 EXPECT_EQ(expected_id, server_designated_id); | 342 EXPECT_EQ(expected_id, server_designated_id); |
343 EXPECT_FALSE(client_state->has_server_designated_connection_id()); | 343 EXPECT_FALSE(client_state->has_server_designated_connection_id()); |
344 } | 344 } |
345 | 345 |
346 } // namespace | 346 } // namespace |
347 } // namespace test | 347 } // namespace test |
348 } // namespace net | 348 } // namespace net |
OLD | NEW |