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

Side by Side Diff: chrome/browser/media_galleries/fileapi/iphoto_file_util_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 public: 161 public:
162 IPhotoFileUtilTest() 162 IPhotoFileUtilTest()
163 : io_thread_(content::BrowserThread::IO, &message_loop_) { 163 : io_thread_(content::BrowserThread::IO, &message_loop_) {
164 } 164 }
165 virtual ~IPhotoFileUtilTest() {} 165 virtual ~IPhotoFileUtilTest() {}
166 166
167 void SetUpDataProvider() { 167 void SetUpDataProvider() {
168 ASSERT_TRUE(fake_library_dir_.CreateUniqueTempDir()); 168 ASSERT_TRUE(fake_library_dir_.CreateUniqueTempDir());
169 ASSERT_EQ( 169 ASSERT_EQ(
170 0, 170 0,
171 file_util::WriteFile( 171 base::WriteFile(
172 fake_library_dir_.path().AppendASCII("a.jpg"), 172 fake_library_dir_.path().AppendASCII("a.jpg"),
173 NULL, 173 NULL,
174 0)); 174 0));
175 ASSERT_EQ( 175 ASSERT_EQ(
176 0, 176 0,
177 file_util::WriteFile( 177 base::WriteFile(
178 fake_library_dir_.path().AppendASCII("orig.jpg"), 178 fake_library_dir_.path().AppendASCII("orig.jpg"),
179 NULL, 179 NULL,
180 0)); 180 0));
181 181
182 iphoto_data_provider_.reset( 182 iphoto_data_provider_.reset(
183 new TestIPhotoDataProvider(fake_library_dir_.path())); 183 new TestIPhotoDataProvider(fake_library_dir_.path()));
184 } 184 }
185 185
186 virtual void SetUp() OVERRIDE { 186 virtual void SetUp() OVERRIDE {
187 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); 187 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir());
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 completed = false; 337 completed = false;
338 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 338 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
339 ASSERT_TRUE(completed); 339 ASSERT_TRUE(completed);
340 ASSERT_EQ(1u, contents.size()); 340 ASSERT_EQ(1u, contents.size());
341 341
342 EXPECT_FALSE(contents.front().is_directory); 342 EXPECT_FALSE(contents.front().is_directory);
343 EXPECT_EQ("a.jpg", contents.front().name); 343 EXPECT_EQ("a.jpg", contents.front().name);
344 } 344 }
345 345
346 } // namespace iphoto 346 } // namespace iphoto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698