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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 304353012: Introduce STATE_RESERVED_REMOTE. No behavioral changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build. More robust expectation Created 6 years, 6 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_session.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 5ba63c0993df7ce9d23fa50156bb9296882c1706..12fad9119471a687c2f1c471b6385a18e89dbd18 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -4522,6 +4522,28 @@ TEST_P(SpdySessionTest, GoAwayOnSessionFlowControlError) {
EXPECT_TRUE(session == NULL);
}
+TEST_P(SpdySessionTest, SplitHeaders) {
+ GURL kStreamUrl("http://www.google.com/foo.dat");
+ SpdyHeaderBlock headers;
+ spdy_util_.AddUrlToHeaderBlock(kStreamUrl.spec(), &headers);
+ headers["alpha"] = "beta";
+
+ SpdyHeaderBlock request_headers;
+ SpdyHeaderBlock response_headers;
+
+ SplitPushedHeadersToRequestAndResponse(
+ headers, spdy_util_.spdy_version(), &request_headers, &response_headers);
+
+ SpdyHeaderBlock::const_iterator it = response_headers.find("alpha");
+ std::string alpha_val =
+ (it == response_headers.end()) ? std::string() : it->second;
+ EXPECT_EQ("beta", alpha_val);
+
+ GURL request_url =
+ GetUrlFromHeaderBlock(request_headers, spdy_util_.spdy_version(), true);
+ EXPECT_EQ(kStreamUrl, request_url);
+}
+
TEST(MapFramerErrorToProtocolError, MapsValues) {
CHECK_EQ(
SPDY_ERROR_INVALID_CONTROL_FRAME,
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698