OLD | NEW |
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 }; | 318 }; |
319 | 319 |
320 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { | 320 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { |
321 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); | 321 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); |
322 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; | 322 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; |
323 | 323 |
324 // Prepare the test file/directory. | 324 // Prepare the test file/directory. |
325 SetUpOneTestCase(root_path(), test_case); | 325 SetUpOneTestCase(root_path(), test_case); |
326 | 326 |
327 // Make sure regular GetFileInfo succeeds. | 327 // Make sure regular GetFileInfo succeeds. |
328 base::PlatformFileInfo info; | 328 base::File::Info info; |
329 ASSERT_TRUE(base::GetFileInfo(root_path().Append(test_case.path), &info)); | 329 ASSERT_TRUE(base::GetFileInfo(root_path().Append(test_case.path), &info)); |
330 if (!test_case.is_directory) | 330 if (!test_case.is_directory) |
331 ASSERT_EQ(test_case.data_file_size, info.size); | 331 ASSERT_EQ(test_case.data_file_size, info.size); |
332 ASSERT_EQ(test_case.is_directory, info.is_directory); | 332 ASSERT_EQ(test_case.is_directory, info.is_directory); |
333 } | 333 } |
334 | 334 |
335 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { | 335 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { |
336 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); | 336 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); |
337 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; | 337 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; |
338 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path)); | 338 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path)); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 EXPECT_EQ(base::PLATFORM_FILE_OK, | 535 EXPECT_EQ(base::PLATFORM_FILE_OK, |
536 file_util()->Truncate(GetOperationContext().get(), url, 999)); | 536 file_util()->Truncate(GetOperationContext().get(), url, 999)); |
537 ASSERT_EQ(base::PLATFORM_FILE_OK, | 537 ASSERT_EQ(base::PLATFORM_FILE_OK, |
538 file_util()->GetFileInfo(GetOperationContext().get(), url, | 538 file_util()->GetFileInfo(GetOperationContext().get(), url, |
539 &info, &platform_path)); | 539 &info, &platform_path)); |
540 EXPECT_EQ(999, info.size); | 540 EXPECT_EQ(999, info.size); |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 } // namespace fileapi | 544 } // namespace fileapi |
OLD | NEW |