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

Unified Diff: net/base/upload_data_stream_unittest.cc

Issue 1250002: Report unreadable files as size zero when uploading. (Closed)
Patch Set: Address comments Created 10 years, 9 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/base/upload_data_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data_stream_unittest.cc
diff --git a/net/base/upload_data_stream_unittest.cc b/net/base/upload_data_stream_unittest.cc
index 701bad96ece310a230ef231ded11334e09a32b6a..92c065ed51e65e01d2af123629012e4499b6fe48 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -78,7 +78,9 @@ TEST_F(UploadDataStreamTest, FileSmallerThanLength) {
read_counter += stream->buf_len();
stream->DidConsume(stream->buf_len());
}
- EXPECT_LT(read_counter, stream->size());
+ // UpdateDataStream will pad out the file with 0 bytes so that the HTTP
+ // transaction doesn't hang. Therefore we expected the full size.
+ EXPECT_EQ(read_counter, stream->size());
file_util::Delete(temp_file_path, false);
}
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698