Commit cdc749f3 authored by bnc's avatar bnc Committed by Commit bot

Remove HTTP/2 status text from SpdyTestUtil.

Remove status text "OK" from SpdyTestUtil::ConstructSpdyPush() and
SpdyTestUtil::ConstructSpdyPushHeaders(), because HTTP/2 bans the use of status
text.  Update net_unittests.

Review URL: https://codereview.chromium.org/1637033002

Cr-Commit-Position: refs/heads/master@{#371804}
parent 57c0ab7a
...@@ -2539,7 +2539,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) { ...@@ -2539,7 +2539,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushBeforeSynReply) { TEST_P(SpdyNetworkTransactionTest, ServerPushBeforeSynReply) {
...@@ -2582,7 +2582,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushBeforeSynReply) { ...@@ -2582,7 +2582,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushBeforeSynReply) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame2) { TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame2) {
...@@ -2625,7 +2625,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame2) { ...@@ -2625,7 +2625,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame2) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushServerAborted) { TEST_P(SpdyNetworkTransactionTest, ServerPushServerAborted) {
...@@ -2725,7 +2725,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushDuplicate) { ...@@ -2725,7 +2725,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushDuplicate) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrame) { TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrame) {
...@@ -2779,7 +2779,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrame) { ...@@ -2779,7 +2779,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrame) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) { TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) {
...@@ -2832,7 +2832,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) { ...@@ -2832,7 +2832,7 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) {
// Verify the pushed stream. // Verify the pushed stream.
EXPECT_TRUE(response2.headers.get() != NULL); EXPECT_TRUE(response2.headers.get() != NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); EXPECT_EQ("HTTP/1.1 200", response2.headers->GetStatusLine());
} }
TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) { TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
......
...@@ -981,7 +981,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPush(const char* const extra_headers[], ...@@ -981,7 +981,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPush(const char* const extra_headers[],
SpdySynStreamIR syn_stream(stream_id); SpdySynStreamIR syn_stream(stream_id);
syn_stream.set_associated_to_stream_id(associated_stream_id); syn_stream.set_associated_to_stream_id(associated_stream_id);
syn_stream.SetHeader("hello", "bye"); syn_stream.SetHeader("hello", "bye");
syn_stream.SetHeader(GetStatusKey(), "200 OK"); syn_stream.SetHeader(GetStatusKey(), "200");
syn_stream.SetHeader(GetVersionKey(), "HTTP/1.1"); syn_stream.SetHeader(GetVersionKey(), "HTTP/1.1");
AddUrlToHeaderBlock(url, syn_stream.mutable_header_block()); AddUrlToHeaderBlock(url, syn_stream.mutable_header_block());
AppendToHeaderBlock(extra_headers, extra_header_count, AppendToHeaderBlock(extra_headers, extra_header_count,
...@@ -994,7 +994,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPush(const char* const extra_headers[], ...@@ -994,7 +994,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPush(const char* const extra_headers[],
CreateFramer(false)->SerializeFrame(push_promise)); CreateFramer(false)->SerializeFrame(push_promise));
SpdyHeadersIR headers(stream_id); SpdyHeadersIR headers(stream_id);
headers.SetHeader(GetStatusKey(), "200 OK"); headers.SetHeader(GetStatusKey(), "200");
headers.SetHeader("hello", "bye"); headers.SetHeader("hello", "bye");
AppendToHeaderBlock(extra_headers, extra_header_count, AppendToHeaderBlock(extra_headers, extra_header_count,
headers.mutable_header_block()); headers.mutable_header_block());
...@@ -1080,7 +1080,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPushHeaders( ...@@ -1080,7 +1080,7 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyPushHeaders(
const char* const extra_headers[], const char* const extra_headers[],
int extra_header_count) { int extra_header_count) {
SpdyHeadersIR headers(stream_id); SpdyHeadersIR headers(stream_id);
headers.SetHeader(GetStatusKey(), "200 OK"); headers.SetHeader(GetStatusKey(), "200");
MaybeAddVersionHeader(&headers); MaybeAddVersionHeader(&headers);
AppendToHeaderBlock(extra_headers, extra_header_count, AppendToHeaderBlock(extra_headers, extra_header_count,
headers.mutable_header_block()); headers.mutable_header_block());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment