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

Side by Side Diff: chrome/browser/media_galleries/media_folder_finder_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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media_galleries/media_folder_finder.h" 5 #include "chrome/browser/media_galleries/media_folder_finder.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (uniquifier > 0) { 124 if (uniquifier > 0) {
125 test_file = test_file.InsertBeforeExtensionASCII( 125 test_file = test_file.InsertBeforeExtensionASCII(
126 base::StringPrintf(" (%d)", uniquifier)); 126 base::StringPrintf(" (%d)", uniquifier));
127 filesize += uniquifier; 127 filesize += uniquifier;
128 } 128 }
129 129
130 std::string dummy_data; 130 std::string dummy_data;
131 dummy_data.resize(filesize); 131 dummy_data.resize(filesize);
132 132
133 int bytes_written = 133 int bytes_written =
134 file_util::WriteFile(test_file, dummy_data.c_str(), filesize); 134 base::WriteFile(test_file, dummy_data.c_str(), filesize);
135 ASSERT_GE(bytes_written, 0); 135 ASSERT_GE(bytes_written, 0);
136 ASSERT_EQ(filesize, static_cast<size_t>(bytes_written)); 136 ASSERT_EQ(filesize, static_cast<size_t>(bytes_written));
137 } 137 }
138 } 138 }
139 139
140 void RunLoop() { 140 void RunLoop() {
141 base::RunLoop().RunUntilIdle(); 141 base::RunLoop().RunUntilIdle();
142 content::BrowserThread::GetBlockingPool()->FlushForTesting(); 142 content::BrowserThread::GetBlockingPool()->FlushForTesting();
143 } 143 }
144 144
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 // |fake_home_dir| and its ancestors do not show up in results. 404 // |fake_home_dir| and its ancestors do not show up in results.
405 expected_results.erase(fake_dir()); 405 expected_results.erase(fake_dir());
406 expected_results.erase(fake_home_dir); 406 expected_results.erase(fake_home_dir);
407 407
408 CreateMediaFolderFinder(folders, true, expected_results); 408 CreateMediaFolderFinder(folders, true, expected_results);
409 StartScan(); 409 StartScan();
410 RunLoopUntilReceivedCallback(); 410 RunLoopUntilReceivedCallback();
411 DeleteMediaFolderFinder(); 411 DeleteMediaFolderFinder();
412 } 412 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698