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

Unified Diff: net/spdy/spdy_network_transaction_spdy3_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: _ 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
Index: net/spdy/spdy_network_transaction_spdy3_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
index 3ef9a85cd53e1b33ac38ff8006125f1c26356d23..a348213d75395eea8d9ea19b93926cdf4b97fe83 100644
--- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
@@ -1658,16 +1658,13 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, 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[] = {
@@ -1706,12 +1703,11 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, 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[] = {

Powered by Google App Engine
This is Rietveld 408576698