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

Unified Diff: net/quic/core/spdy_utils_test.cc

Issue 2603723002: Add a new QUIC platform API for text utilities. (Closed)
Patch Set: net/tools/quic/quic_packet_printer_bin.cc 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
« no previous file with comments | « net/quic/core/spdy_utils.cc ('k') | net/quic/platform/api/quic_text_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/spdy_utils_test.cc
diff --git a/net/quic/core/spdy_utils_test.cc b/net/quic/core/spdy_utils_test.cc
index c07f9dee58fab31308a9b5ef19034cd9aa39cf5c..75823c3de37837a6df8dcf2cdc743456d605bc4a 100644
--- a/net/quic/core/spdy_utils_test.cc
+++ b/net/quic/core/spdy_utils_test.cc
@@ -4,9 +4,10 @@
#include "net/quic/core/spdy_utils.h"
#include "base/macros.h"
-#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
+#include "net/quic/platform/api/quic_text_utils.h"
#include "net/test/gtest_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
using base::StringPiece;
using std::string;
@@ -26,7 +27,8 @@ TEST(SpdyUtilsTest, SerializeAndParseHeaders) {
input_headers[":pseudo2"] = "pseudo value2";
input_headers["key1"] = "value1";
const int64_t kContentLength = 1234;
- input_headers["content-length"] = base::Int64ToString(kContentLength);
+ input_headers["content-length"] =
+ QuicTextUtils::Uint64ToString(kContentLength);
input_headers["key2"] = "value2";
// Serialize the header block.
@@ -55,7 +57,8 @@ TEST(SpdyUtilsTest, SerializeAndParseHeadersLargeContentLength) {
input_headers[":pseudo2"] = "pseudo value2";
input_headers["key1"] = "value1";
const int64_t kContentLength = 12345678900;
- input_headers["content-length"] = base::Int64ToString(kContentLength);
+ input_headers["content-length"] =
+ QuicTextUtils::Uint64ToString(kContentLength);
input_headers["key2"] = "value2";
// Serialize the header block.
@@ -80,7 +83,8 @@ TEST(SpdyUtilsTest, SerializeAndParseValidTrailers) {
// result is the same as the trailers that the test started with.
SpdyHeaderBlock input_trailers;
const size_t kFinalOffset = 5678;
- input_trailers[kFinalOffsetHeaderKey] = base::IntToString(kFinalOffset);
+ input_trailers[kFinalOffsetHeaderKey] =
+ QuicTextUtils::Uint64ToString(kFinalOffset);
input_trailers["key1"] = "value1";
input_trailers["key2"] = "value2";
« no previous file with comments | « net/quic/core/spdy_utils.cc ('k') | net/quic/platform/api/quic_text_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698