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

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 145640)
+++ net/spdy/spdy_network_transaction_spdy3_unittest.cc (working copy)
@@ -41,16 +41,22 @@
virtual void SetUp() {
SpdySession::set_default_protocol(kProtoSPDY3);
+ merge_chunks_ = UploadDataStream::merge_chunks();
google_get_request_initialized_ = false;
google_post_request_initialized_ = false;
google_chunked_post_request_initialized_ = false;
}
virtual void TearDown() {
+ UploadDataStream::set_merge_chunks(merge_chunks_);
// 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 +91,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.
@@ -528,6 +533,7 @@
HttpRequestInfo google_chunked_post_request_;
HttpRequestInfo google_get_push_request_;
SpdyTestStateHelper spdy_state_;
+ bool merge_chunks_;
};
//-----------------------------------------------------------------------------
@@ -1608,7 +1614,9 @@
// Test that a chunked POST works.
TEST_P(SpdyNetworkTransactionSpdy3Test, ChunkedPost) {
- UploadDataStream::set_merge_chunks(false);
+ // TODO(satish): Remove this once we have a better way to unit test POST
Ryan Hamilton 2012/07/09 17:52:02 satish?
ramant (doing other things) 2012/07/11 01:36:18 Done.
+ // 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));

Powered by Google App Engine
This is Rietveld 408576698