Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: net/quic/core/crypto/quic_crypto_server_config_test.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config_test.cc ('k') | net/quic/core/crypto/quic_random_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/quic_crypto_server_config_test.cc
diff --git a/net/quic/core/crypto/quic_crypto_server_config_test.cc b/net/quic/core/crypto/quic_crypto_server_config_test.cc
index d67030e4246da888c8b9b1b51385957f5be8701a..6c1407661cdf62ebc953cb1247c4fe02729139e4 100644
--- a/net/quic/core/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config_test.cc
@@ -16,17 +16,19 @@
#include "net/quic/core/crypto/quic_random.h"
#include "net/quic/core/quic_time.h"
#include "net/quic/platform/api/quic_socket_address.h"
+#include "net/quic/platform/api/quic_test.h"
#include "net/quic/test_tools/crypto_test_utils.h"
#include "net/quic/test_tools/mock_clock.h"
#include "net/quic/test_tools/quic_crypto_server_config_peer.h"
-#include "testing/gtest/include/gtest/gtest.h"
using std::string;
namespace net {
namespace test {
-TEST(QuicCryptoServerConfigTest, ServerConfig) {
+class QuicCryptoServerConfigTest : public QuicTest {};
+
+TEST_F(QuicCryptoServerConfigTest, ServerConfig) {
QuicRandom* rand = QuicRandom::GetInstance();
QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
crypto_test_utils::ProofSourceForTesting());
@@ -45,7 +47,7 @@ TEST(QuicCryptoServerConfigTest, ServerConfig) {
EXPECT_LE(1u, aead.size());
}
-TEST(QuicCryptoServerConfigTest, CompressCerts) {
+TEST_F(QuicCryptoServerConfigTest, CompressCerts) {
QuicCompressedCertsCache compressed_certs_cache(
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize);
@@ -64,7 +66,7 @@ TEST(QuicCryptoServerConfigTest, CompressCerts) {
EXPECT_EQ(compressed_certs_cache.Size(), 1u);
}
-TEST(QuicCryptoServerConfigTest, CompressSameCertsTwice) {
+TEST_F(QuicCryptoServerConfigTest, CompressSameCertsTwice) {
QuicCompressedCertsCache compressed_certs_cache(
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize);
@@ -91,7 +93,7 @@ TEST(QuicCryptoServerConfigTest, CompressSameCertsTwice) {
EXPECT_EQ(compressed_certs_cache.Size(), 1u);
}
-TEST(QuicCryptoServerConfigTest, CompressDifferentCerts) {
+TEST_F(QuicCryptoServerConfigTest, CompressDifferentCerts) {
// This test compresses a set of similar but not identical certs. Cache if
// used should return cache miss and add all the compressed certs.
QuicCompressedCertsCache compressed_certs_cache(
@@ -132,7 +134,7 @@ TEST(QuicCryptoServerConfigTest, CompressDifferentCerts) {
EXPECT_EQ(compressed_certs_cache.Size(), 3u);
}
-class SourceAddressTokenTest : public ::testing::Test {
+class SourceAddressTokenTest : public QuicTest {
public:
SourceAddressTokenTest()
: ip4_(QuicIpAddress::Loopback4()),
@@ -274,7 +276,7 @@ TEST_F(SourceAddressTokenTest, SourceAddressTokenMultipleAddresses) {
ValidateSourceAddressTokens(kPrimary, token4or6, ip6_));
}
-class CryptoServerConfigsTest : public ::testing::Test {
+class CryptoServerConfigsTest : public QuicTest {
public:
CryptoServerConfigsTest()
: rand_(QuicRandom::GetInstance()),
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config_test.cc ('k') | net/quic/core/crypto/quic_random_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698