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

Unified Diff: net/quic/crypto/cert_compressor_test.cc

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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/crypto/cert_compressor.cc ('k') | net/quic/crypto/common_cert_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/cert_compressor_test.cc
diff --git a/net/quic/crypto/cert_compressor_test.cc b/net/quic/crypto/cert_compressor_test.cc
index c066e61328cd8b08f04c0bf63bcf162cdc77e682..ef12ccce7ffd5deda082c328b579d9d09c959470 100644
--- a/net/quic/crypto/cert_compressor_test.cc
+++ b/net/quic/crypto/cert_compressor_test.cc
@@ -23,8 +23,8 @@ TEST(CertCompressor, EmptyChain) {
EXPECT_EQ("00", base::HexEncode(compressed.data(), compressed.size()));
vector<string> chain2, cached_certs;
- ASSERT_TRUE(CertCompressor::DecompressChain(
- compressed, cached_certs, NULL, &chain2));
+ ASSERT_TRUE(
+ CertCompressor::DecompressChain(compressed, cached_certs, NULL, &chain2));
EXPECT_EQ(chain.size(), chain2.size());
}
@@ -37,8 +37,8 @@ TEST(CertCompressor, Compressed) {
EXPECT_EQ("0100", base::HexEncode(compressed.substr(0, 2).data(), 2));
vector<string> chain2, cached_certs;
- ASSERT_TRUE(CertCompressor::DecompressChain(
- compressed, cached_certs, NULL, &chain2));
+ ASSERT_TRUE(
+ CertCompressor::DecompressChain(compressed, cached_certs, NULL, &chain2));
EXPECT_EQ(chain.size(), chain2.size());
EXPECT_EQ(chain[0], chain2[0]);
}
@@ -47,22 +47,22 @@ TEST(CertCompressor, Common) {
vector<string> chain;
chain.push_back("testcert");
static const uint64 set_hash = 42;
- scoped_ptr<CommonCertSet> common_set(
- CryptoTestUtils::MockCommonCertSet(chain[0], set_hash, 1));
+ scoped_ptr<CommonCertSets> common_set(
+ CryptoTestUtils::MockCommonCertSets(chain[0], set_hash, 1));
const string compressed = CertCompressor::CompressChain(
- chain, StringPiece(reinterpret_cast<const char*>(&set_hash),
- sizeof(set_hash)),
+ chain,
+ StringPiece(reinterpret_cast<const char*>(&set_hash), sizeof(set_hash)),
StringPiece(), common_set.get());
- const string common("03" /* common */
+ const string common("03" /* common */
"2A00000000000000" /* set hash 42 */
- "01000000" /* index 1 */
- "00" /* end of list */);
+ "01000000" /* index 1 */
+ "00" /* end of list */);
EXPECT_EQ(common.data(),
base::HexEncode(compressed.data(), compressed.size()));
vector<string> chain2, cached_certs;
- ASSERT_TRUE(CertCompressor::DecompressChain(
- compressed, cached_certs, common_set.get(), &chain2));
+ ASSERT_TRUE(CertCompressor::DecompressChain(compressed, cached_certs,
+ common_set.get(), &chain2));
EXPECT_EQ(chain.size(), chain2.size());
EXPECT_EQ(chain[0], chain2[0]);
}
@@ -82,8 +82,8 @@ TEST(CertCompressor, Cached) {
vector<string> cached_certs, chain2;
cached_certs.push_back(chain[0]);
- ASSERT_TRUE(CertCompressor::DecompressChain(
- compressed, cached_certs, NULL, &chain2));
+ ASSERT_TRUE(
+ CertCompressor::DecompressChain(compressed, cached_certs, NULL, &chain2));
EXPECT_EQ(chain.size(), chain2.size());
EXPECT_EQ(chain[0], chain2[0]);
}
@@ -116,7 +116,7 @@ TEST(CertCompressor, BadInputs) {
hash_and_index_truncated.size()),
cached_certs, NULL, &chain));
- /* without a CommonCertSet */
+ /* without a CommonCertSets */
const string without_a_common_cert_set(
"03" "0000000000000000" "00000000");
EXPECT_FALSE(CertCompressor::DecompressChain(
@@ -124,8 +124,8 @@ TEST(CertCompressor, BadInputs) {
without_a_common_cert_set.size()),
cached_certs, NULL, &chain));
- scoped_ptr<CommonCertSet> common_set(
- CryptoTestUtils::MockCommonCertSet("foo", 42, 1));
+ scoped_ptr<CommonCertSets> common_set(
+ CryptoTestUtils::MockCommonCertSets("foo", 42, 1));
/* incorrect hash and index */
const string incorrect_hash_and_index(
« no previous file with comments | « net/quic/crypto/cert_compressor.cc ('k') | net/quic/crypto/common_cert_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698