Index: net/spdy/spdy_http_stream_unittest.cc |
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc |
index 8724853aa27119ae0ac8ddf61828ccbd38865241..3dbdbe32e0f7b9e65e5b792b2d83365f4e8deb91 100644 |
--- a/net/spdy/spdy_http_stream_unittest.cc |
+++ b/net/spdy/spdy_http_stream_unittest.cc |
@@ -437,7 +437,7 @@ TEST_P(SpdyHttpStreamTest, ConnectionClosedDuringChunkedPost) { |
http_stream.SendRequest(headers, &response, callback.callback())); |
EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key)); |
- EXPECT_EQ(OK, callback.WaitForResult()); |
+ EXPECT_EQ(ERR_CONNECTION_CLOSED, callback.WaitForResult()); |
EXPECT_EQ(static_cast<int64_t>(req->size() + body->size()), |
http_stream.GetTotalSentBytes()); |
@@ -520,8 +520,7 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) { |
// Complete the initial request write and the first chunk. |
base::RunLoop().RunUntilIdle(); |
- ASSERT_TRUE(callback.have_result()); |
- EXPECT_EQ(OK, callback.WaitForResult()); |
+ ASSERT_FALSE(callback.have_result()); |
// Now append the final two chunks which will enqueue two more writes. |
upload_stream.AppendData(kUploadData1, kUploadData1Size, false); |
@@ -529,6 +528,8 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) { |
// Finish writing all the chunks and do all reads. |
base::RunLoop().RunUntilIdle(); |
+ ASSERT_TRUE(callback.have_result()); |
+ EXPECT_EQ(OK, callback.WaitForResult()); |
EXPECT_EQ(static_cast<int64_t>(req->size() + chunk1->size() + chunk2->size() + |
chunk3->size()), |
@@ -620,8 +621,7 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithEmptyFinalDataFrame) { |
// Complete the initial request write and the first chunk. |
base::RunLoop().RunUntilIdle(); |
- ASSERT_TRUE(callback.have_result()); |
- EXPECT_EQ(OK, callback.WaitForResult()); |
+ ASSERT_FALSE(callback.have_result()); |
EXPECT_EQ(static_cast<int64_t>(req->size() + chunk1->size()), |
http_stream->GetTotalSentBytes()); |
@@ -632,6 +632,8 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithEmptyFinalDataFrame) { |
// Finish writing the final frame, and perform all reads. |
base::RunLoop().RunUntilIdle(); |
+ ASSERT_TRUE(callback.have_result()); |
+ EXPECT_EQ(OK, callback.WaitForResult()); |
// Check response headers. |
ASSERT_EQ(OK, http_stream->ReadResponseHeaders(callback.callback())); |
@@ -835,8 +837,7 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) { |
// Complete the initial request write and first chunk. |
base::RunLoop().RunUntilIdle(); |
- ASSERT_TRUE(callback.have_result()); |
- EXPECT_EQ(OK, callback.WaitForResult()); |
+ ASSERT_FALSE(callback.have_result()); |
EXPECT_EQ(static_cast<int64_t>(req->size()), |
http_stream->GetTotalSentBytes()); |
@@ -844,6 +845,9 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) { |
upload_stream.AppendData(kUploadData, kUploadDataSize, true); |
+ ASSERT_TRUE(callback.have_result()); |
+ EXPECT_EQ(OK, callback.WaitForResult()); |
+ |
// Verify that the window size has decreased. |
ASSERT_TRUE(http_stream->stream() != NULL); |
EXPECT_NE(static_cast<int>( |