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

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

Issue 9320059: Define FilePath::NormalizePathSeparators on all platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 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/isolated_context_unittest.cc ('k') | no next file » | 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1193
1194 EXPECT_TRUE(ofu()->MigrateFromOldSandbox(origin(), type(), root_path)); 1194 EXPECT_TRUE(ofu()->MigrateFromOldSandbox(origin(), type(), root_path));
1195 1195
1196 FilePath new_root = 1196 FilePath new_root =
1197 test_directory().AppendASCII("File System").AppendASCII("000").Append( 1197 test_directory().AppendASCII("File System").AppendASCII("000").Append(
1198 ofu()->GetDirectoryNameForType(type())).AppendASCII("Legacy"); 1198 ofu()->GetDirectoryNameForType(type())).AppendASCII("Legacy");
1199 for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) { 1199 for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
1200 SCOPED_TRACE(testing::Message() << "Validating kMigrationTestPath " << i); 1200 SCOPED_TRACE(testing::Message() << "Validating kMigrationTestPath " << i);
1201 const test::TestCaseRecord& test_case = test::kRegularTestCases[i]; 1201 const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
1202 FilePath local_data_path = new_root.Append(test_case.path); 1202 FilePath local_data_path = new_root.Append(test_case.path);
1203 #if defined(OS_WIN) 1203 local_data_path = local_data_path.NormalizePathSeparators();
1204 local_data_path = local_data_path.NormalizeWindowsPathSeparators();
1205 #endif
1206 scoped_ptr<FileSystemOperationContext> context(NewContext(NULL)); 1204 scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
1207 base::PlatformFileInfo ofu_file_info; 1205 base::PlatformFileInfo ofu_file_info;
1208 FilePath data_path; 1206 FilePath data_path;
1209 SCOPED_TRACE(testing::Message() << "Path is " << test_case.path); 1207 SCOPED_TRACE(testing::Message() << "Path is " << test_case.path);
1210 EXPECT_EQ(base::PLATFORM_FILE_OK, 1208 EXPECT_EQ(base::PLATFORM_FILE_OK,
1211 ofu()->GetFileInfo(context.get(), FilePath(test_case.path), 1209 ofu()->GetFileInfo(context.get(), FilePath(test_case.path),
1212 &ofu_file_info, &data_path)); 1210 &ofu_file_info, &data_path));
1213 if (test_case.is_directory) { 1211 if (test_case.is_directory) {
1214 EXPECT_TRUE(ofu_file_info.is_directory); 1212 EXPECT_TRUE(ofu_file_info.is_directory);
1215 } else { 1213 } else {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForCopyAndMove) { 1653 TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForCopyAndMove) {
1656 TestDirectoryTimestampHelper( 1654 TestDirectoryTimestampHelper(
1657 FilePath(FILE_PATH_LITERAL("copy overwrite")), true, true); 1655 FilePath(FILE_PATH_LITERAL("copy overwrite")), true, true);
1658 TestDirectoryTimestampHelper( 1656 TestDirectoryTimestampHelper(
1659 FilePath(FILE_PATH_LITERAL("copy non-overwrite")), true, false); 1657 FilePath(FILE_PATH_LITERAL("copy non-overwrite")), true, false);
1660 TestDirectoryTimestampHelper( 1658 TestDirectoryTimestampHelper(
1661 FilePath(FILE_PATH_LITERAL("move overwrite")), false, true); 1659 FilePath(FILE_PATH_LITERAL("move overwrite")), false, true);
1662 TestDirectoryTimestampHelper( 1660 TestDirectoryTimestampHelper(
1663 FilePath(FILE_PATH_LITERAL("move non-overwrite")), false, false); 1661 FilePath(FILE_PATH_LITERAL("move non-overwrite")), false, false);
1664 } 1662 }
OLDNEW
« no previous file with comments | « webkit/fileapi/isolated_context_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698