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

Side by Side Diff: content/browser/fileapi/dragged_file_util_unittest.cc

Issue 89523002: Move Posix file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/common/logging_chrome.cc ('k') | content/browser/fileapi/local_file_util_unittest.cc » ('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 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 <queue> 6 #include <queue>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 entry.is_directory = file_info.IsDirectory(); 367 entry.is_directory = file_info.IsDirectory();
368 entry.name = current.BaseName().value(); 368 entry.name = current.BaseName().value();
369 entry.size = file_info.GetSize(); 369 entry.size = file_info.GetSize();
370 entry.last_modified_time = file_info.GetLastModifiedTime(); 370 entry.last_modified_time = file_info.GetLastModifiedTime();
371 expected_entry_map[entry.name] = entry; 371 expected_entry_map[entry.name] = entry;
372 372
373 #if defined(OS_POSIX) 373 #if defined(OS_POSIX)
374 // Creates a symlink for each file/directory. 374 // Creates a symlink for each file/directory.
375 // They should be ignored by ReadDirectory, so we don't add them 375 // They should be ignored by ReadDirectory, so we don't add them
376 // to expected_entry_map. 376 // to expected_entry_map.
377 file_util::CreateSymbolicLink( 377 base::CreateSymbolicLink(
378 current, 378 current,
379 dir_path.Append(current.BaseName().AddExtension( 379 dir_path.Append(current.BaseName().AddExtension(
380 FILE_PATH_LITERAL("link")))); 380 FILE_PATH_LITERAL("link"))));
381 #endif 381 #endif
382 } 382 }
383 383
384 // Perform ReadDirectory in the isolated filesystem. 384 // Perform ReadDirectory in the isolated filesystem.
385 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path)); 385 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
386 FileEntryList entries; 386 FileEntryList entries;
387 ASSERT_EQ(base::PLATFORM_FILE_OK, 387 ASSERT_EQ(base::PLATFORM_FILE_OK,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 EXPECT_EQ(base::PLATFORM_FILE_OK, 536 EXPECT_EQ(base::PLATFORM_FILE_OK,
537 file_util()->Truncate(GetOperationContext().get(), url, 999)); 537 file_util()->Truncate(GetOperationContext().get(), url, 999));
538 ASSERT_EQ(base::PLATFORM_FILE_OK, 538 ASSERT_EQ(base::PLATFORM_FILE_OK,
539 file_util()->GetFileInfo(GetOperationContext().get(), url, 539 file_util()->GetFileInfo(GetOperationContext().get(), url,
540 &info, &platform_path)); 540 &info, &platform_path));
541 EXPECT_EQ(999, info.size); 541 EXPECT_EQ(999, info.size);
542 } 542 }
543 } 543 }
544 544
545 } // namespace fileapi 545 } // namespace fileapi
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | content/browser/fileapi/local_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698