Index: net/spdy/spdy_network_transaction_spdy3_unittest.cc |
=================================================================== |
--- net/spdy/spdy_network_transaction_spdy3_unittest.cc (revision 145922) |
+++ net/spdy/spdy_network_transaction_spdy3_unittest.cc (working copy) |
@@ -47,10 +47,15 @@ |
} |
virtual void TearDown() { |
+ UploadDataStream::ResetMergeChunks(); |
// Empty the current queue. |
MessageLoop::current()->RunAllPending(); |
} |
+ void set_merge_chunks(bool merge) { |
+ UploadDataStream::set_merge_chunks(merge); |
+ } |
+ |
struct TransactionHelperResult { |
int rv; |
std::string status_line; |
@@ -85,9 +90,8 @@ |
default: |
NOTREACHED(); |
} |
- } |
+ } |
- |
~NormalSpdyTransactionHelper() { |
// Any test which doesn't close the socket by sending it an EOF will |
// have a valid session left open, which leaks the entire session pool. |
@@ -1595,7 +1599,10 @@ |
// Test that a chunked POST works. |
TEST_P(SpdyNetworkTransactionSpdy3Test, ChunkedPost) { |
- UploadDataStream::set_merge_chunks(false); |
+ // Disable merging of chunks until we have a better way to unit test POST |
+ // requests with chunked uploads. |
+ set_merge_chunks(false); |
+ |
scoped_ptr<SpdyFrame> req(ConstructChunkedSpdyPost(NULL, 0)); |
scoped_ptr<SpdyFrame> chunk1(ConstructSpdyBodyFrame(1, false)); |
scoped_ptr<SpdyFrame> chunk2(ConstructSpdyBodyFrame(1, true)); |
@@ -2062,8 +2069,10 @@ |
scoped_ptr<SpdyFrame> reply(ConstructSpdyPostSynReply(NULL, 0)); |
MockRead reads[] = { |
+ CreateMockRead(*reply), |
Ryan Hamilton
2012/07/11 17:11:19
Why is this change required? Since the test used
ramant (doing other things)
2012/07/11 19:40:43
As we have discussed, re-implemented this test usi
|
CreateMockRead(*window_update2), |
CreateMockRead(*window_update2), |
+ CreateMockRead(*window_update2), |
CreateMockRead(*window_update), |
CreateMockRead(*window_update), |
CreateMockRead(*window_update), |