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

Unified Diff: net/base/upload_data_stream_unittest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/file_stream_unittest.cc ('k') | net/base/upload_file_element_reader_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 fa6c4374ad0bef719ca69b5de2f174c4d446e1a2..90a78d24b52de5db96a5fc956ab0cabe06e45f17 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -174,7 +174,7 @@ TEST_F(UploadDataStreamTest, File) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
element_readers_.push_back(
new UploadFileElementReader(base::MessageLoopProxy::current().get(),
@@ -208,7 +208,7 @@ TEST_F(UploadDataStreamTest, FileSmallerThanLength) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
const uint64 kFakeSize = kTestDataSize*2;
UploadFileElementReader::ScopedOverridingContentLengthForTests
@@ -326,7 +326,7 @@ TEST_F(UploadDataStreamTest, FileAndBytes) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
const uint64 kFileRangeOffset = 1;
const uint64 kFileRangeLength = 4;
@@ -552,7 +552,7 @@ TEST_F(UploadDataStreamTest, FileChanged) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
base::File::Info file_info;
ASSERT_TRUE(base::GetFileInfo(temp_file_path, &file_info));
@@ -571,7 +571,7 @@ TEST_F(UploadDataStreamTest, MultipleInit) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -615,7 +615,7 @@ TEST_F(UploadDataStreamTest, MultipleInitAsync) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
TestCompletionCallback test_callback;
// Prepare data.
@@ -658,7 +658,7 @@ TEST_F(UploadDataStreamTest, InitToReset) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -715,7 +715,7 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncInit) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -763,7 +763,7 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncRead) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
« no previous file with comments | « net/base/file_stream_unittest.cc ('k') | net/base/upload_file_element_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698