Chromium Code Reviews| Index: net/spdy/spdy_network_transaction_spdy2_unittest.cc |
| diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc |
| index 53fe5453ed831419d11032ec1ac2076b2ac84e0d..4dc5b897facf7dd4a523dbfe0e61e276d33f349d 100644 |
| --- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc |
| +++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc |
| @@ -4975,7 +4975,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushClaimBeforeHeaders) { |
| CreateMockRead(*stream2_headers, 4), |
| MockRead(ASYNC, reinterpret_cast<const char*>(kPushBodyFrame), |
| arraysize(kPushBodyFrame), 5), |
| - MockRead(ASYNC, 0, 5), // EOF |
| + MockRead(ASYNC, 0, 6), // EOF |
| }; |
| HttpResponseInfo response; |
| @@ -5024,10 +5024,6 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushClaimBeforeHeaders) { |
| std::string result; |
| ReadResult(trans, data.get(), &result); |
| - // Verify that we consumed all test data. |
| - EXPECT_TRUE(data->at_read_eof()); |
| - EXPECT_TRUE(data->at_write_eof()); |
| - |
| // Verify that the received push data is same as the expected push data. |
| EXPECT_EQ(result2.compare(expected_push_result), 0) |
| << "Received data: " |
| @@ -5040,7 +5036,9 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushClaimBeforeHeaders) { |
| response = *trans->GetResponseInfo(); |
| response2 = *trans2->GetResponseInfo(); |
| + LOG(INFO) << "Here"; |
| VerifyStreamsClosed(helper); |
| + LOG(INFO) << "Here"; |
|
Ryan Sleevi
2012/07/18 18:02:13
unnecessary?
Ryan Hamilton
2012/07/18 18:45:06
Done.
|
| // Verify the SYN_REPLY. |
| EXPECT_TRUE(response.headers != NULL); |
| @@ -5049,6 +5047,13 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushClaimBeforeHeaders) { |
| // Verify the pushed stream. |
| EXPECT_TRUE(response2.headers != NULL); |
| EXPECT_EQ("HTTP/1.1 200 OK", response2.headers->GetStatusLine()); |
| + |
| + // Read the final EOF (which will close the session) |
| + data->RunFor(1); |
| + |
| + // Verify that we consumed all test data. |
| + EXPECT_TRUE(data->at_read_eof()); |
| + EXPECT_TRUE(data->at_write_eof()); |
| } |
| TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithTwoHeaderFrames) { |
| @@ -5124,7 +5129,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithTwoHeaderFrames) { |
| CreateMockRead(*stream2_headers2, 5), |
| MockRead(ASYNC, reinterpret_cast<const char*>(kPushBodyFrame), |
| arraysize(kPushBodyFrame), 6), |
| - MockRead(ASYNC, 0, 6), // EOF |
| + MockRead(ASYNC, 0, 7), // EOF |
| }; |
| HttpResponseInfo response; |
| @@ -5173,10 +5178,6 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithTwoHeaderFrames) { |
| std::string result; |
| ReadResult(trans, data.get(), &result); |
| - // Verify that we consumed all test data. |
| - EXPECT_TRUE(data->at_read_eof()); |
| - EXPECT_TRUE(data->at_write_eof()); |
| - |
| // Verify that the received push data is same as the expected push data. |
| EXPECT_EQ(result2.compare(expected_push_result), 0) |
| << "Received data: " |
| @@ -5206,6 +5207,13 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithTwoHeaderFrames) { |
| EXPECT_TRUE(response2.headers->HasHeaderValue("hello", "bye")); |
| EXPECT_TRUE(response2.headers->HasHeaderValue("status", "200")); |
| EXPECT_TRUE(response2.headers->HasHeaderValue("version", "HTTP/1.1")); |
| + |
| + // Read the final EOF (which will close the session) |
| + data->RunFor(1); |
| + |
| + // Verify that we consumed all test data. |
| + EXPECT_TRUE(data->at_read_eof()); |
| + EXPECT_TRUE(data->at_write_eof()); |
| } |
| TEST_P(SpdyNetworkTransactionSpdy2Test, SynReplyWithHeaders) { |