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

Side by Side Diff: webkit/fileapi/local_file_util_unittest.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/local_file_util.cc ('k') | webkit/fileapi/media/device_media_file_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 LocalFileUtil* FileUtil() { 46 LocalFileUtil* FileUtil() {
47 return static_cast<LocalFileUtil*>(test_helper_.file_util()); 47 return static_cast<LocalFileUtil*>(test_helper_.file_util());
48 } 48 }
49 49
50 FileSystemURL Path(const std::string& file_name) { 50 FileSystemURL Path(const std::string& file_name) {
51 return test_helper_.CreateURLFromUTF8(file_name); 51 return test_helper_.CreateURLFromUTF8(file_name);
52 } 52 }
53 53
54 FilePath LocalPath(const char *file_name) { 54 base::FilePath LocalPath(const char *file_name) {
55 return test_helper_.GetLocalPathFromASCII(file_name); 55 return test_helper_.GetLocalPathFromASCII(file_name);
56 } 56 }
57 57
58 bool FileExists(const char *file_name) { 58 bool FileExists(const char *file_name) {
59 return file_util::PathExists(LocalPath(file_name)) && 59 return file_util::PathExists(LocalPath(file_name)) &&
60 !file_util::DirectoryExists(LocalPath(file_name)); 60 !file_util::DirectoryExists(LocalPath(file_name));
61 } 61 }
62 62
63 bool DirectoryExists(const char *file_name) { 63 bool DirectoryExists(const char *file_name) {
64 return file_util::DirectoryExists(LocalPath(file_name)); 64 return file_util::DirectoryExists(LocalPath(file_name));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 test_helper().SameFileUtilMove(context.get(), 325 test_helper().SameFileUtilMove(context.get(),
326 Path(from_dir), Path(to_dir))); 326 Path(from_dir), Path(to_dir)));
327 327
328 EXPECT_FALSE(DirectoryExists(from_dir)); 328 EXPECT_FALSE(DirectoryExists(from_dir));
329 EXPECT_TRUE(DirectoryExists(to_dir)); 329 EXPECT_TRUE(DirectoryExists(to_dir));
330 EXPECT_TRUE(FileExists(to_file)); 330 EXPECT_TRUE(FileExists(to_file));
331 EXPECT_EQ(1020, GetSize(to_file)); 331 EXPECT_EQ(1020, GetSize(to_file));
332 } 332 }
333 333
334 } // namespace fileapi 334 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_util.cc ('k') | webkit/fileapi/media/device_media_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698