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

Unified Diff: net/spdy/spdy_network_transaction_spdy2_unittest.cc

Issue 10878082: net: Move file operation code from UploadData to UploadDataStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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
« no previous file with comments | « net/net.gyp ('k') | net/spdy/spdy_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_spdy2_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
index 2ed9500b0e730d6f0648dfb04b5932e9389a9822..b3afbf97eb36320f62ffe54ba25d95a48528a59c 100644
--- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
@@ -1652,16 +1652,13 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, EmptyPost) {
request.upload_data = new UploadData();
// Http POST Content-Length is using UploadDataStream::size().
- // It is the same as request.upload_data->GetContentLengthSync().
+ const uint64 kContentLength = 0;
scoped_ptr<UploadDataStream> stream(
new UploadDataStream(request.upload_data));
ASSERT_EQ(OK, stream->Init());
- ASSERT_EQ(request.upload_data->GetContentLengthSync(),
- stream->size());
+ ASSERT_EQ(kContentLength, stream->size());
- scoped_ptr<SpdyFrame>
- req(ConstructSpdyPost(
- request.upload_data->GetContentLengthSync(), NULL, 0));
+ scoped_ptr<SpdyFrame> req(ConstructSpdyPost(kContentLength, NULL, 0));
// Set the FIN bit since there will be no body.
req->set_flags(CONTROL_FLAG_FIN);
MockWrite writes[] = {
@@ -1700,12 +1697,11 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, PostWithEarlySynReply) {
request.upload_data->AppendBytes(upload, sizeof(upload));
// Http POST Content-Length is using UploadDataStream::size().
- // It is the same as request.upload_data->GetContentLengthSync().
+ const uint64 kContentLength = sizeof(upload);
scoped_ptr<UploadDataStream> stream(
new UploadDataStream(request.upload_data));
ASSERT_EQ(OK, stream->Init());
- ASSERT_EQ(request.upload_data->GetContentLengthSync(),
- stream->size());
+ ASSERT_EQ(kContentLength, stream->size());
scoped_ptr<SpdyFrame> stream_reply(ConstructSpdyPostSynReply(NULL, 0));
scoped_ptr<SpdyFrame> stream_body(ConstructSpdyBodyFrame(1, true));
MockRead reads[] = {
« no previous file with comments | « net/net.gyp ('k') | net/spdy/spdy_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698