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

Unified Diff: net/spdy/spdy_stream_unittest.cc

Issue 2596703002: http2: Update priorities of pushed streams (Closed)
Patch Set: actually rebase Created 3 years, 11 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_stream.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream_unittest.cc
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index d9d58a60547c345b8ef8634d0a80592990eb5497..9f60908a9b6bfaff4afa0833c8fff4fce999b9c3 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -294,6 +294,10 @@ TEST_F(SpdyStreamTest, PushedStream) {
spdy_util_.ConstructSpdyPush(nullptr, 0, 2, 1, kPushUrl));
AddRead(push);
+ SpdySerializedFrame priority(
+ spdy_util_.ConstructSpdyPriority(2, 1, IDLE, true));
+ AddWrite(priority);
+
AddReadPause();
base::StringPiece pushed_msg("foo");
@@ -340,9 +344,9 @@ TEST_F(SpdyStreamTest, PushedStream) {
data.RunUntilPaused();
base::WeakPtr<SpdyStream> push_stream;
- EXPECT_THAT(
- session->GetPushStream(GURL(kPushUrl), &push_stream, NetLogWithSource()),
- IsOk());
+ EXPECT_THAT(session->GetPushStream(GURL(kPushUrl), IDLE, &push_stream,
+ NetLogWithSource()),
+ IsOk());
ASSERT_TRUE(push_stream);
EXPECT_EQ(kPushUrl, push_stream->GetUrlFromHeaders().spec());
@@ -613,6 +617,10 @@ TEST_F(SpdyStreamTest, UpperCaseHeadersOnPush) {
kExtraHeaders, arraysize(kExtraHeaders) / 2, 2, 1, kPushUrl));
AddRead(push);
+ SpdySerializedFrame priority(
+ spdy_util_.ConstructSpdyPriority(2, 1, IDLE, true));
+ AddWrite(priority);
+
SpdySerializedFrame rst(
spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR));
AddWrite(rst);
@@ -649,9 +657,9 @@ TEST_F(SpdyStreamTest, UpperCaseHeadersOnPush) {
data.RunUntilPaused();
base::WeakPtr<SpdyStream> push_stream;
- EXPECT_THAT(
- session->GetPushStream(GURL(kPushUrl), &push_stream, NetLogWithSource()),
- IsOk());
+ EXPECT_THAT(session->GetPushStream(GURL(kPushUrl), IDLE, &push_stream,
+ NetLogWithSource()),
+ IsOk());
EXPECT_FALSE(push_stream);
data.Resume();
@@ -728,6 +736,10 @@ TEST_F(SpdyStreamTest, HeadersMustHaveStatusOnPushedStream) {
spdy_util_.ConstructGetHeaderBlock(kPushUrl), 2, 1));
AddRead(push_promise);
+ SpdySerializedFrame priority(
+ spdy_util_.ConstructSpdyPriority(2, 1, IDLE, true));
+ AddWrite(priority);
+
// Response headers without ":status" header field: protocol error.
SpdyHeaderBlock header_block_without_status;
header_block_without_status[spdy_util_.GetMethodKey()] = "GET";
@@ -840,6 +852,10 @@ TEST_F(SpdyStreamTest, HeadersMustPreceedDataOnPushedStream) {
spdy_util_.ConstructGetHeaderBlock(kPushUrl), 2, 1));
AddRead(push_promise);
+ SpdySerializedFrame priority(
+ spdy_util_.ConstructSpdyPriority(2, 1, IDLE, true));
+ AddWrite(priority);
+
SpdySerializedFrame pushed_body(
spdy_util_.ConstructSpdyDataFrame(2, kPostBody, kPostBodyLength, true));
AddRead(pushed_body);
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698