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

Unified Diff: net/quic/core/crypto/cert_compressor_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
Index: net/quic/core/crypto/cert_compressor_test.cc
diff --git a/net/quic/core/crypto/cert_compressor_test.cc b/net/quic/core/crypto/cert_compressor_test.cc
index af6f6174c60d77bfdb574a757d23f692078518d2..a75cb590885245479e251ba67c208ee719c57cc4 100644
--- a/net/quic/core/crypto/cert_compressor_test.cc
+++ b/net/quic/core/crypto/cert_compressor_test.cc
@@ -7,16 +7,18 @@
#include <memory>
#include "net/quic/core/quic_utils.h"
+#include "net/quic/platform/api/quic_test.h"
#include "net/quic/platform/api/quic_text_utils.h"
#include "net/quic/test_tools/crypto_test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
using std::string;
namespace net {
namespace test {
-TEST(CertCompressor, EmptyChain) {
+class CertCompressorTest : public QuicTest {};
+
+TEST_F(CertCompressorTest, EmptyChain) {
std::vector<string> chain;
const string compressed = CertCompressor::CompressChain(
chain, QuicStringPiece(), QuicStringPiece(), nullptr);
@@ -28,7 +30,7 @@ TEST(CertCompressor, EmptyChain) {
EXPECT_EQ(chain.size(), chain2.size());
}
-TEST(CertCompressor, Compressed) {
+TEST_F(CertCompressorTest, Compressed) {
std::vector<string> chain;
chain.push_back("testcert");
const string compressed = CertCompressor::CompressChain(
@@ -43,7 +45,7 @@ TEST(CertCompressor, Compressed) {
EXPECT_EQ(chain[0], chain2[0]);
}
-TEST(CertCompressor, Common) {
+TEST_F(CertCompressorTest, Common) {
std::vector<string> chain;
chain.push_back("testcert");
static const uint64_t set_hash = 42;
@@ -68,7 +70,7 @@ TEST(CertCompressor, Common) {
EXPECT_EQ(chain[0], chain2[0]);
}
-TEST(CertCompressor, Cached) {
+TEST_F(CertCompressorTest, Cached) {
std::vector<string> chain;
chain.push_back("testcert");
uint64_t hash = QuicUtils::FNV1a_64_Hash(chain[0]);
@@ -88,7 +90,7 @@ TEST(CertCompressor, Cached) {
EXPECT_EQ(chain[0], chain2[0]);
}
-TEST(CertCompressor, BadInputs) {
+TEST_F(CertCompressorTest, BadInputs) {
std::vector<string> cached_certs, chain;
EXPECT_FALSE(CertCompressor::DecompressChain(
« no previous file with comments | « net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc ('k') | net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698