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

Unified Diff: net/spdy/spdy_network_transaction_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_http_utils.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 670674571c23824db8dfba2cbc457b68c0745671..5e86757785921a8a0df5a6baa4813716743db67e 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -5385,6 +5385,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
EXPECT_TRUE(data.at_write_eof());
}
+// TODO(baranovich): HTTP 2 does not allow multiple HEADERS frames
TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
// We push a stream and attempt to claim it before the headers come down.
scoped_ptr<SpdyFrame> stream1_syn(
@@ -5396,6 +5397,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
};
scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock());
+ (*initial_headers)["alpha"] = "beta";
spdy_util_.AddUrlToHeaderBlock(
"http://www.google.com/foo.dat", initial_headers.get());
scoped_ptr<SpdyFrame> stream2_syn(
@@ -5512,24 +5514,8 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine());
- // Verify we got all the headers
- if (spdy_util_.spdy_version() < SPDY3) {
- EXPECT_TRUE(response2.headers->HasHeaderValue(
- "url",
- "http://www.google.com/foo.dat"));
- } else {
- EXPECT_TRUE(response2.headers->HasHeaderValue(
- "scheme", "http"));
- EXPECT_TRUE(response2.headers->HasHeaderValue(
- "path", "/foo.dat"));
- if (spdy_util_.spdy_version() < SPDY4) {
- EXPECT_TRUE(response2.headers->HasHeaderValue(
- "host", "www.google.com"));
- } else {
- EXPECT_TRUE(response2.headers->HasHeaderValue(
- "authority", "www.google.com"));
- }
- }
+ // Verify we got all the headers from all header blocks.
+ EXPECT_TRUE(response2.headers->HasHeaderValue("alpha", "beta"));
EXPECT_TRUE(response2.headers->HasHeaderValue("hello", "bye"));
EXPECT_TRUE(response2.headers->HasHeaderValue("status", "200"));
« no previous file with comments | « net/spdy/spdy_http_utils.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698