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

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

Issue 2603723002: Add a new QUIC platform API for text utilities. (Closed)
Patch Set: Tests Created 4 years 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/quic_compressed_certs_cache_test.cc
diff --git a/net/quic/core/crypto/quic_compressed_certs_cache_test.cc b/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
index 7757364f1232366101f4caec3b687ba7581ab642..2cf9746f797bc077ed6f2683e882b805425ef90f 100644
--- a/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
+++ b/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
@@ -6,8 +6,8 @@
#include "base/logging.h"
#include "base/macros.h"
-#include "base/strings/string_number_conversions.h"
#include "net/quic/core/crypto/cert_compressor.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"
@@ -56,10 +56,12 @@ TEST_F(QuicCompressedCertsCacheTest, CacheMiss) {
certs_cache_.Insert(chain, common_certs, cached_certs, compressed);
- EXPECT_EQ(nullptr, certs_cache_.GetCompressedCert(
- chain, "mismatched common certs", cached_certs));
- EXPECT_EQ(nullptr, certs_cache_.GetCompressedCert(chain, common_certs,
- "mismatched cached certs"));
+ EXPECT_EQ(nullptr,
+ certs_cache_.GetCompressedCert(chain, "mismatched common certs",
+ cached_certs));
+ EXPECT_EQ(nullptr,
+ certs_cache_.GetCompressedCert(chain, common_certs,
+ "mismatched cached certs"));
// A different chain though with equivalent certs should get a cache miss.
QuicReferenceCountedPointer<ProofSource::Chain> chain2(
@@ -85,7 +87,8 @@ TEST_F(QuicCompressedCertsCacheTest, CacheMissDueToEviction) {
for (unsigned int i = 0;
i < QuicCompressedCertsCache::kQuicCompressedCertsCacheSize; i++) {
EXPECT_EQ(certs_cache_.Size(), i + 1);
- certs_cache_.Insert(chain, IntToString(i), "", IntToString(i));
+ certs_cache_.Insert(chain, QuicTextUtils::Uint64ToString(i), "",
+ QuicTextUtils::Uint64ToString(i));
}
EXPECT_EQ(certs_cache_.MaxSize(), certs_cache_.Size());

Powered by Google App Engine
This is Rietveld 408576698