Remove Http2String wrapper for std::string.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 263816460
Change-Id: I4f365540414e6a3d78fd00ce6b39a4cdd4c14140
diff --git a/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc b/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
index 11b0d97..ec807c8 100644
--- a/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
+++ b/http2/hpack/decoder/hpack_decoder_string_buffer_test.cc
@@ -11,7 +11,6 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
-#include "net/third_party/quiche/src/http2/platform/api/http2_string.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_string_utils.h"
#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
@@ -33,11 +32,11 @@
// We want to know that HTTP2_LOG(x) << buf_ will work in production should
// that be needed, so we test that it outputs the expected values.
- AssertionResult VerifyLogHasSubstrs(std::initializer_list<Http2String> strs) {
+ AssertionResult VerifyLogHasSubstrs(std::initializer_list<std::string> strs) {
HTTP2_VLOG(1) << buf_;
std::ostringstream ss;
buf_.OutputDebugStringTo(ss);
- Http2String dbg_str(ss.str());
+ std::string dbg_str(ss.str());
for (const auto& expected : strs) {
VERIFY_THAT(dbg_str, HasSubstr(expected));
}
@@ -153,7 +152,7 @@
}
TEST_F(HpackDecoderStringBufferTest, HuffmanWhole) {
- Http2String encoded = Http2HexDecode("f1e3c2e5f23a6ba0ab90f4ff");
+ std::string encoded = Http2HexDecode("f1e3c2e5f23a6ba0ab90f4ff");
Http2StringPiece decoded("www.example.com");
EXPECT_EQ(state(), State::RESET);
@@ -172,15 +171,15 @@
EXPECT_TRUE(VerifyLogHasSubstrs(
{"{state=COMPLETE", "backing=BUFFERED", "buffer: www.example.com}"}));
- Http2String s = buf_.ReleaseString();
+ std::string s = buf_.ReleaseString();
EXPECT_EQ(s, decoded);
EXPECT_EQ(state(), State::RESET);
}
TEST_F(HpackDecoderStringBufferTest, HuffmanSplit) {
- Http2String encoded = Http2HexDecode("f1e3c2e5f23a6ba0ab90f4ff");
- Http2String part1 = encoded.substr(0, 5);
- Http2String part2 = encoded.substr(5);
+ std::string encoded = Http2HexDecode("f1e3c2e5f23a6ba0ab90f4ff");
+ std::string part1 = encoded.substr(0, 5);
+ std::string part2 = encoded.substr(5);
Http2StringPiece decoded("www.example.com");
EXPECT_EQ(state(), State::RESET);
@@ -217,7 +216,7 @@
TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnData) {
// Explicitly encode the End-of-String symbol, a no-no.
- Http2String encoded = Http2HexDecode("ffffffff");
+ std::string encoded = Http2HexDecode("ffffffff");
buf_.OnStart(/*huffman_encoded*/ true, encoded.size());
EXPECT_EQ(state(), State::COLLECTING);
@@ -231,7 +230,7 @@
TEST_F(HpackDecoderStringBufferTest, InvalidHuffmanOnEnd) {
// Last byte of string doesn't end with prefix of End-of-String symbol.
- Http2String encoded = Http2HexDecode("00");
+ std::string encoded = Http2HexDecode("00");
buf_.OnStart(/*huffman_encoded*/ true, encoded.size());
EXPECT_EQ(state(), State::COLLECTING);