Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: net/spdy/spdy_network_transaction_spdy3_unittest.cc

Issue 10689034: SPDY - chunked upload - speech recognition doesn't work with SPDY/3 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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),

Powered by Google App Engine
This is Rietveld 408576698