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

Unified Diff: net/tools/quic/quic_simple_server_stream_test.cc

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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/tools/quic/quic_simple_server_stream.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server_stream_test.cc
diff --git a/net/tools/quic/quic_simple_server_stream_test.cc b/net/tools/quic/quic_simple_server_stream_test.cc
index 4a444e3c916c177102dc825c69c98c9e138205a1..86b27d13a26d7d5b298a603d7f0cfdd8404f7ddb 100644
--- a/net/tools/quic/quic_simple_server_stream_test.cc
+++ b/net/tools/quic/quic_simple_server_stream_test.cc
@@ -8,7 +8,6 @@
#include <memory>
#include <utility>
-#include "base/strings/string_piece.h"
#include "net/quic/core/quic_utils.h"
#include "net/quic/core/spdy_utils.h"
#include "net/quic/platform/api/quic_ptr_util.h"
@@ -22,7 +21,6 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using base::StringPiece;
using std::string;
using testing::_;
using testing::AnyNumber;
@@ -534,7 +532,7 @@ TEST_P(QuicSimpleServerStreamTest, InvalidMultipleContentLength) {
SpdyHeaderBlock request_headers;
// \000 is a way to write the null byte when followed by a literal digit.
- header_list_.OnHeader("content-length", StringPiece("11\00012", 5));
+ header_list_.OnHeader("content-length", QuicStringPiece("11\00012", 5));
headers_string_ = SpdyUtils::SerializeUncompressedHeaders(request_headers);
@@ -554,7 +552,7 @@ TEST_P(QuicSimpleServerStreamTest, InvalidLeadingNullContentLength) {
SpdyHeaderBlock request_headers;
// \000 is a way to write the null byte when followed by a literal digit.
- header_list_.OnHeader("content-length", StringPiece("\00012", 3));
+ header_list_.OnHeader("content-length", QuicStringPiece("\00012", 3));
headers_string_ = SpdyUtils::SerializeUncompressedHeaders(request_headers);
@@ -572,7 +570,7 @@ TEST_P(QuicSimpleServerStreamTest, InvalidLeadingNullContentLength) {
TEST_P(QuicSimpleServerStreamTest, ValidMultipleContentLength) {
SpdyHeaderBlock request_headers;
// \000 is a way to write the null byte when followed by a literal digit.
- header_list_.OnHeader("content-length", StringPiece("11\00011", 5));
+ header_list_.OnHeader("content-length", QuicStringPiece("11\00011", 5));
headers_string_ = SpdyUtils::SerializeUncompressedHeaders(request_headers);
@@ -638,7 +636,7 @@ TEST_P(QuicSimpleServerStreamTest, InvalidHeadersWithFin) {
0x54, 0x54, 0x50, 0x2f, // TTP/
0x31, 0x2e, 0x31, // 1.1
};
- StringPiece data(arr, arraysize(arr));
+ QuicStringPiece data(arr, arraysize(arr));
QuicStreamFrame frame(stream_->id(), true, 0, data);
// Verify that we don't crash when we get a invalid headers in stream frame.
stream_->OnStreamFrame(frame);
« no previous file with comments | « net/tools/quic/quic_simple_server_stream.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698