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

Unified Diff: net/spdy/spdy_protocol_test.cc

Issue 2801603003: Add SpdyString alias for std::string in net/spdy. (Closed)
Patch Set: Created 3 years, 8 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/spdy/spdy_protocol.cc ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_protocol_test.cc
diff --git a/net/spdy/spdy_protocol_test.cc b/net/spdy/spdy_protocol_test.cc
index cc12a62ca3d39a91c2c01a2ebc2cd946acfd36ea..7dffc98ed3e6d6ac9c2a3665b4976d7883dd812b 100644
--- a/net/spdy/spdy_protocol_test.cc
+++ b/net/spdy/spdy_protocol_test.cc
@@ -14,8 +14,6 @@
#include "net/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-using std::string;
-
namespace net {
std::ostream& operator<<(std::ostream& os,
@@ -128,7 +126,7 @@ TEST(SpdyProtocolTest, SettingsIdToString) {
struct {
SpdySettingsIds setting_id;
bool expected_bool;
- const string expected_string;
+ const SpdyString expected_string;
} test_cases[] = {
{static_cast<SpdySettingsIds>(0), false, "SETTINGS_UNKNOWN"},
{SETTINGS_HEADER_TABLE_SIZE, true, "SETTINGS_HEADER_TABLE_SIZE"},
@@ -234,19 +232,19 @@ TEST(SpdyDataIRTest, Construct) {
EXPECT_NE(SpdyStringPiece(d1.data(), d1.data_len()), s2);
// Confirm copies a const string.
- const string foo = "foo";
+ const SpdyString foo = "foo";
SpdyDataIR d3(3, foo);
EXPECT_EQ(foo, d3.data());
// Confirm copies a non-const string.
- string bar = "bar";
+ SpdyString bar = "bar";
SpdyDataIR d4(4, bar);
EXPECT_EQ("bar", bar);
EXPECT_EQ("bar", SpdyStringPiece(d4.data(), d4.data_len()));
// Confirm moves an rvalue reference. Note that the test string "baz" is too
// short to trigger the move optimization, and instead a copy occurs.
- string baz = "the quick brown fox";
+ SpdyString baz = "the quick brown fox";
SpdyDataIR d5(5, std::move(baz));
EXPECT_EQ("", baz);
EXPECT_EQ(SpdyStringPiece(d5.data(), d5.data_len()), "the quick brown fox");
« no previous file with comments | « net/spdy/spdy_protocol.cc ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698