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

Unified Diff: net/base/upload_data_stream_unittest.cc

Issue 10868064: net: Move data reading functionalities from UploadElement to UploadElementReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/base/upload_element.h » ('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 dc415f84e1af0ffa817f939098960e14c14520d3..8a8ec394a667b7d662dcc650c6dae18ac55dce86 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -16,6 +16,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/upload_data.h"
+#include "net/base/upload_file_element_reader.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -116,10 +117,12 @@ TEST_F(UploadDataStreamTest, FileSmallerThanLength) {
file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
const uint64 kFakeSize = kTestDataSize*2;
+ UploadFileElementReader::ScopedOverridingContentLengthForTests
+ overriding_content_length(kFakeSize);
+
std::vector<UploadElement> elements;
UploadElement element;
element.SetToFilePath(temp_file_path);
- element.SetContentLength(kFakeSize);
elements.push_back(element);
upload_data_->SetElements(elements);
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/base/upload_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698