| Index: net/quic/crypto/quic_crypto_server_config_test.cc
|
| diff --git a/net/quic/crypto/quic_crypto_server_config_test.cc b/net/quic/crypto/quic_crypto_server_config_test.cc
|
| index 4b0aa5a572264a122aa8d27b37d2389104cfd5d5..fa43b739341102081a65214d6104811933071beb 100644
|
| --- a/net/quic/crypto/quic_crypto_server_config_test.cc
|
| +++ b/net/quic/crypto/quic_crypto_server_config_test.cc
|
| @@ -15,6 +15,7 @@
|
| #include "net/quic/crypto/strike_register_client.h"
|
| #include "net/quic/quic_flags.h"
|
| #include "net/quic/quic_time.h"
|
| +#include "net/quic/test_tools/crypto_test_utils.h"
|
| #include "net/quic/test_tools/mock_clock.h"
|
| #include "net/quic/test_tools/quic_test_utils.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| @@ -218,7 +219,12 @@ class TestStrikeRegisterClient : public StrikeRegisterClient {
|
|
|
| TEST(QuicCryptoServerConfigTest, ServerConfig) {
|
| QuicRandom* rand = QuicRandom::GetInstance();
|
| - QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand);
|
| + QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
|
| +#if defined(USE_OPENSSL)
|
| + CryptoTestUtils::ProofSourceForTesting());
|
| +#else
|
| + CryptoTestUtils::FakeProofSourceForTesting());
|
| +#endif
|
| MockClock clock;
|
|
|
| scoped_ptr<CryptoHandshakeMessage>(
|
| @@ -228,7 +234,12 @@ TEST(QuicCryptoServerConfigTest, ServerConfig) {
|
|
|
| TEST(QuicCryptoServerConfigTest, GetOrbitIsCalledWithoutTheStrikeRegisterLock) {
|
| QuicRandom* rand = QuicRandom::GetInstance();
|
| - QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand);
|
| + QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
|
| +#if defined(USE_OPENSSL)
|
| + CryptoTestUtils::ProofSourceForTesting());
|
| +#else
|
| + CryptoTestUtils::FakeProofSourceForTesting());
|
| +#endif
|
| MockClock clock;
|
|
|
| TestStrikeRegisterClient* strike_register =
|
| @@ -249,7 +260,13 @@ class SourceAddressTokenTest : public ::testing::Test {
|
| ip6_(Loopback6()),
|
| original_time_(QuicWallTime::Zero()),
|
| rand_(QuicRandom::GetInstance()),
|
| - server_(QuicCryptoServerConfig::TESTING, rand_),
|
| + server_(QuicCryptoServerConfig::TESTING,
|
| + rand_,
|
| +#if defined(USE_OPENSSL)
|
| + CryptoTestUtils::ProofSourceForTesting()),
|
| +#else
|
| + CryptoTestUtils::FakeProofSourceForTesting()),
|
| +#endif
|
| peer_(&server_) {
|
| // Advance the clock to some non-zero time.
|
| clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1000000));
|
| @@ -422,7 +439,12 @@ TEST_F(SourceAddressTokenTest, SourceAddressTokenMultipleAddresses) {
|
|
|
| TEST(QuicCryptoServerConfigTest, ValidateServerNonce) {
|
| QuicRandom* rand = QuicRandom::GetInstance();
|
| - QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand);
|
| + QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
|
| +#if defined(USE_OPENSSL)
|
| + CryptoTestUtils::ProofSourceForTesting());
|
| +#else
|
| + CryptoTestUtils::FakeProofSourceForTesting());
|
| +#endif
|
| QuicCryptoServerConfigPeer peer(&server);
|
|
|
| StringPiece message("hello world");
|
| @@ -453,8 +475,15 @@ class CryptoServerConfigsTest : public ::testing::Test {
|
| public:
|
| CryptoServerConfigsTest()
|
| : rand_(QuicRandom::GetInstance()),
|
| - config_(QuicCryptoServerConfig::TESTING, rand_),
|
| - test_peer_(&config_) {}
|
| + config_(QuicCryptoServerConfig::TESTING,
|
| + rand_,
|
| +#if defined(USE_OPENSSL)
|
| + CryptoTestUtils::ProofSourceForTesting()),
|
| +#else
|
| + CryptoTestUtils::FakeProofSourceForTesting()),
|
| +#endif
|
| + test_peer_(&config_) {
|
| + }
|
|
|
| void SetUp() override {
|
| clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1000));
|
|
|