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

Unified Diff: net/tools/flip_server/spdy_interface_test.cc

Issue 1357953002: Replace the existing SpdyHeaderBlock typedef with a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some includes. Created 5 years, 3 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
Index: net/tools/flip_server/spdy_interface_test.cc
diff --git a/net/tools/flip_server/spdy_interface_test.cc b/net/tools/flip_server/spdy_interface_test.cc
index 8a9cb2adc4890299579abe757a2fac75093e873e..f6800e68fa5edc6c838882e4dd6f460752a7f1a2 100644
--- a/net/tools/flip_server/spdy_interface_test.cc
+++ b/net/tools/flip_server/spdy_interface_test.cc
@@ -395,8 +395,10 @@ TEST_P(SpdySMProxyTest, SendErrorNotFound) {
ASSERT_EQ(2, spdy_framer_->frames_received());
ASSERT_EQ(2u, actual_header_block.size());
- ASSERT_EQ("404 Not Found", actual_header_block[":status"]);
- ASSERT_EQ("HTTP/1.1", actual_header_block[":version"]);
+ ASSERT_EQ("404 Not Found",
+ static_cast<StringPiece>(actual_header_block[":status"]));
+ ASSERT_EQ("HTTP/1.1",
+ static_cast<StringPiece>(actual_header_block[":version"]));
ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size));
}
@@ -424,11 +426,13 @@ TEST_P(SpdySMProxyTest, SendSynStream) {
spdy_framer_->ProcessInput(df->data, df->size);
ASSERT_EQ(1, spdy_framer_->frames_received());
ASSERT_EQ(5u, actual_header_block.size());
- ASSERT_EQ("GET", actual_header_block[":method"]);
- ASSERT_EQ("HTTP/1.1", actual_header_block[":version"]);
- ASSERT_EQ("/path", actual_header_block[":path"]);
- ASSERT_EQ("www.example.com", actual_header_block[":host"]);
- ASSERT_EQ("value1", actual_header_block["key1"]);
+ ASSERT_EQ("GET", static_cast<StringPiece>(actual_header_block[":method"]));
+ ASSERT_EQ("HTTP/1.1",
+ static_cast<StringPiece>(actual_header_block[":version"]));
+ ASSERT_EQ("/path", static_cast<StringPiece>(actual_header_block[":path"]));
+ ASSERT_EQ("www.example.com",
+ static_cast<StringPiece>(actual_header_block[":host"]));
+ ASSERT_EQ("value1", static_cast<StringPiece>(actual_header_block["key1"]));
}
TEST_P(SpdySMProxyTest, SendSynReply) {
@@ -460,9 +464,10 @@ TEST_P(SpdySMProxyTest, SendSynReply) {
spdy_framer_->ProcessInput(df->data, df->size);
ASSERT_EQ(1, spdy_framer_->frames_received());
ASSERT_EQ(3u, actual_header_block.size());
- ASSERT_EQ("200 OK", actual_header_block[":status"]);
- ASSERT_EQ("HTTP/1.1", actual_header_block[":version"]);
- ASSERT_EQ("value1", actual_header_block["key1"]);
+ ASSERT_EQ("200 OK", static_cast<StringPiece>(actual_header_block[":status"]));
+ ASSERT_EQ("HTTP/1.1",
+ static_cast<StringPiece>(actual_header_block[":version"]));
+ ASSERT_EQ("value1", static_cast<StringPiece>(actual_header_block["key1"]));
}
TEST_P(SpdySMProxyTest, SendDataFrame) {
@@ -602,8 +607,10 @@ TEST_P(SpdySMServerTest, NewStreamError) {
ASSERT_EQ(2, spdy_framer_->frames_received());
ASSERT_EQ(2u, actual_header_block.size());
- ASSERT_EQ("404 Not Found", actual_header_block["status"]);
- ASSERT_EQ("HTTP/1.1", actual_header_block["version"]);
+ ASSERT_EQ("404 Not Found",
+ static_cast<StringPiece>(actual_header_block["status"]));
+ ASSERT_EQ("HTTP/1.1",
+ static_cast<StringPiece>(actual_header_block["version"]));
ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size));
}

Powered by Google App Engine
This is Rietveld 408576698