| 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 2ab9094c8d5806789691f78308da9e95e0892fbf..af6f6174c60d77bfdb574a757d23f692078518d2 100644
|
| --- a/net/quic/core/crypto/cert_compressor_test.cc
|
| +++ b/net/quic/core/crypto/cert_compressor_test.cc
|
| @@ -11,7 +11,6 @@
|
| #include "net/quic/test_tools/crypto_test_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| -using base::StringPiece;
|
| using std::string;
|
|
|
| namespace net {
|
| @@ -20,7 +19,7 @@ namespace test {
|
| TEST(CertCompressor, EmptyChain) {
|
| std::vector<string> chain;
|
| const string compressed = CertCompressor::CompressChain(
|
| - chain, StringPiece(), StringPiece(), nullptr);
|
| + chain, QuicStringPiece(), QuicStringPiece(), nullptr);
|
| EXPECT_EQ("00", QuicTextUtils::HexEncode(compressed));
|
|
|
| std::vector<string> chain2, cached_certs;
|
| @@ -33,7 +32,7 @@ TEST(CertCompressor, Compressed) {
|
| std::vector<string> chain;
|
| chain.push_back("testcert");
|
| const string compressed = CertCompressor::CompressChain(
|
| - chain, StringPiece(), StringPiece(), nullptr);
|
| + chain, QuicStringPiece(), QuicStringPiece(), nullptr);
|
| ASSERT_GE(compressed.size(), 2u);
|
| EXPECT_EQ("0100", QuicTextUtils::HexEncode(compressed.substr(0, 2)));
|
|
|
| @@ -52,8 +51,9 @@ TEST(CertCompressor, Common) {
|
| crypto_test_utils::MockCommonCertSets(chain[0], set_hash, 1));
|
| const string compressed = CertCompressor::CompressChain(
|
| chain,
|
| - StringPiece(reinterpret_cast<const char*>(&set_hash), sizeof(set_hash)),
|
| - StringPiece(), common_sets.get());
|
| + QuicStringPiece(reinterpret_cast<const char*>(&set_hash),
|
| + sizeof(set_hash)),
|
| + QuicStringPiece(), common_sets.get());
|
| EXPECT_EQ(
|
| "03" /* common */
|
| "2a00000000000000" /* set hash 42 */
|
| @@ -72,9 +72,9 @@ TEST(CertCompressor, Cached) {
|
| std::vector<string> chain;
|
| chain.push_back("testcert");
|
| uint64_t hash = QuicUtils::FNV1a_64_Hash(chain[0]);
|
| - StringPiece hash_bytes(reinterpret_cast<char*>(&hash), sizeof(hash));
|
| - const string compressed =
|
| - CertCompressor::CompressChain(chain, StringPiece(), hash_bytes, nullptr);
|
| + QuicStringPiece hash_bytes(reinterpret_cast<char*>(&hash), sizeof(hash));
|
| + const string compressed = CertCompressor::CompressChain(
|
| + chain, QuicStringPiece(), hash_bytes, nullptr);
|
|
|
| EXPECT_EQ("02" /* cached */ + QuicTextUtils::HexEncode(hash_bytes) +
|
| "00" /* end of list */,
|
|
|