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

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

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix missing comma. Created 8 years, 4 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
« no previous file with comments | « webkit/fileapi/file_system_directory_database.cc ('k') | webkit/fileapi/local_file_util.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 (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 <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/file_util.h" 10 #include "base/file_util.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 continue; 316 continue;
317 317
318 SCOPED_TRACE(testing::Message() << "Testing RegularTestCases " << i 318 SCOPED_TRACE(testing::Message() << "Testing RegularTestCases " << i
319 << ": " << test_case.path); 319 << ": " << test_case.path);
320 320
321 // Read entries in the directory to construct the expected results map. 321 // Read entries in the directory to construct the expected results map.
322 typedef std::map<FilePath::StringType, base::FileUtilProxy::Entry> EntryMap; 322 typedef std::map<FilePath::StringType, base::FileUtilProxy::Entry> EntryMap;
323 EntryMap expected_entry_map; 323 EntryMap expected_entry_map;
324 324
325 FileEnumerator file_enum( 325 FileEnumerator file_enum(
326 GetTestCasePlatformPath(test_case.path), 326 GetTestCasePlatformPath(test_case.path), false /* not recursive */,
327 false /* recursive */, 327 FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
328 static_cast<file_util::FileEnumerator::FileType>(
329 FileEnumerator::FILES | FileEnumerator::DIRECTORIES));
330 FilePath current; 328 FilePath current;
331 while (!(current = file_enum.Next()).empty()) { 329 while (!(current = file_enum.Next()).empty()) {
332 FileEnumerator::FindInfo file_info; 330 FileEnumerator::FindInfo file_info;
333 file_enum.GetFindInfo(&file_info); 331 file_enum.GetFindInfo(&file_info);
334 base::FileUtilProxy::Entry entry; 332 base::FileUtilProxy::Entry entry;
335 entry.is_directory = FileEnumerator::IsDirectory(file_info); 333 entry.is_directory = FileEnumerator::IsDirectory(file_info);
336 entry.name = current.BaseName().value(); 334 entry.name = current.BaseName().value();
337 entry.size = FileEnumerator::GetFilesize(file_info); 335 entry.size = FileEnumerator::GetFilesize(file_info);
338 entry.last_modified_time = FileEnumerator::GetLastModifiedTime(file_info); 336 entry.last_modified_time = FileEnumerator::GetLastModifiedTime(file_info);
339 expected_entry_map[entry.name] = entry; 337 expected_entry_map[entry.name] = entry;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 EXPECT_EQ(base::PLATFORM_FILE_OK, 504 EXPECT_EQ(base::PLATFORM_FILE_OK,
507 file_util()->Truncate(GetOperationContext().get(), url, 999)); 505 file_util()->Truncate(GetOperationContext().get(), url, 999));
508 ASSERT_EQ(base::PLATFORM_FILE_OK, 506 ASSERT_EQ(base::PLATFORM_FILE_OK,
509 file_util()->GetFileInfo(GetOperationContext().get(), url, 507 file_util()->GetFileInfo(GetOperationContext().get(), url,
510 &info, &platform_path)); 508 &info, &platform_path));
511 EXPECT_EQ(999, info.size); 509 EXPECT_EQ(999, info.size);
512 } 510 }
513 } 511 }
514 512
515 } // namespace fileapi 513 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_directory_database.cc ('k') | webkit/fileapi/local_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698