| 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" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 using std::string; | 13 using std::string; |
| 14 using std::vector; | 14 using std::vector; |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 namespace test { | 17 namespace test { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 class TestProofVerifyDetails : public ProofVerifyDetails { | 20 class TestProofVerifyDetails : public ProofVerifyDetails { |
| 21 virtual ~TestProofVerifyDetails() {} | 21 virtual ~TestProofVerifyDetails() {} |
| 22 | 22 |
| 23 // ProofVerifyDetails implementation | 23 // ProofVerifyDetails implementation |
| 24 virtual ProofVerifyDetails* Clone() const OVERRIDE { | 24 virtual ProofVerifyDetails* Clone() const override { |
| 25 return new TestProofVerifyDetails; | 25 return new TestProofVerifyDetails; |
| 26 } | 26 } |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 } // namespace | 29 } // namespace |
| 30 | 30 |
| 31 TEST(QuicCryptoClientConfigTest, CachedState_IsEmpty) { | 31 TEST(QuicCryptoClientConfigTest, CachedState_IsEmpty) { |
| 32 QuicCryptoClientConfig::CachedState state; | 32 QuicCryptoClientConfig::CachedState state; |
| 33 EXPECT_TRUE(state.IsEmpty()); | 33 EXPECT_TRUE(state.IsEmpty()); |
| 34 } | 34 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 EXPECT_EQ(state, cleared_cache); | 262 EXPECT_EQ(state, cleared_cache); |
| 263 EXPECT_FALSE(cleared_cache->proof_valid()); | 263 EXPECT_FALSE(cleared_cache->proof_valid()); |
| 264 EXPECT_TRUE(cleared_cache->server_config().empty()); | 264 EXPECT_TRUE(cleared_cache->server_config().empty()); |
| 265 EXPECT_TRUE(cleared_cache->certs().empty()); | 265 EXPECT_TRUE(cleared_cache->certs().empty()); |
| 266 EXPECT_TRUE(cleared_cache->signature().empty()); | 266 EXPECT_TRUE(cleared_cache->signature().empty()); |
| 267 EXPECT_EQ(2u, cleared_cache->generation_counter()); | 267 EXPECT_EQ(2u, cleared_cache->generation_counter()); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace test | 270 } // namespace test |
| 271 } // namespace net | 271 } // namespace net |
| OLD | NEW |