Index: net/spdy/spdy_network_transaction_spdy2_unittest.cc |
=================================================================== |
--- net/spdy/spdy_network_transaction_spdy2_unittest.cc (revision 145922) |
+++ net/spdy/spdy_network_transaction_spdy2_unittest.cc (working copy) |
@@ -35,6 +35,7 @@ |
SPDYNOSSL, |
SPDYSSL, |
}; |
+ |
class SpdyNetworkTransactionSpdy2Test |
: public ::testing::TestWithParam<SpdyNetworkTransactionSpdy2TestTypes> { |
protected: |
@@ -47,10 +48,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; |
@@ -1587,7 +1593,10 @@ |
// Test that a chunked POST works. |
TEST_P(SpdyNetworkTransactionSpdy2Test, 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)); |