OLD | NEW |
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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "webkit/browser/fileapi/isolated_context.h" | 25 #include "webkit/browser/fileapi/isolated_context.h" |
26 #include "webkit/browser/fileapi/mock_file_system_options.h" | 26 #include "webkit/browser/fileapi/mock_file_system_options.h" |
27 #include "webkit/browser/fileapi/native_file_util.h" | 27 #include "webkit/browser/fileapi/native_file_util.h" |
28 #include "webkit/browser/quota/mock_special_storage_policy.h" | 28 #include "webkit/browser/quota/mock_special_storage_policy.h" |
29 | 29 |
30 #define FPL(x) FILE_PATH_LITERAL(x) | 30 #define FPL(x) FILE_PATH_LITERAL(x) |
31 | 31 |
32 using fileapi::FileSystemOperation; | 32 using fileapi::FileSystemOperation; |
33 using fileapi::FileSystemURL; | 33 using fileapi::FileSystemURL; |
34 | 34 |
35 namespace chrome { | |
36 | |
37 namespace { | 35 namespace { |
38 | 36 |
39 typedef FileSystemOperation::FileEntryList FileEntryList; | 37 typedef FileSystemOperation::FileEntryList FileEntryList; |
40 | 38 |
41 struct FilteringTestCase { | 39 struct FilteringTestCase { |
42 const base::FilePath::CharType* path; | 40 const base::FilePath::CharType* path; |
43 bool is_directory; | 41 bool is_directory; |
44 bool visible; | 42 bool visible; |
45 bool media_file; | 43 bool media_file; |
46 const char* content; | 44 const char* content; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 expected_error = base::PLATFORM_FILE_OK; | 529 expected_error = base::PLATFORM_FILE_OK; |
532 else | 530 else |
533 expected_error = base::PLATFORM_FILE_ERROR_SECURITY; | 531 expected_error = base::PLATFORM_FILE_ERROR_SECURITY; |
534 error = base::PLATFORM_FILE_ERROR_FAILED; | 532 error = base::PLATFORM_FILE_ERROR_FAILED; |
535 operation_runner()->CreateSnapshotFile(url, | 533 operation_runner()->CreateSnapshotFile(url, |
536 base::Bind(CreateSnapshotCallback, &error)); | 534 base::Bind(CreateSnapshotCallback, &error)); |
537 base::MessageLoop::current()->RunUntilIdle(); | 535 base::MessageLoop::current()->RunUntilIdle(); |
538 ASSERT_EQ(expected_error, error); | 536 ASSERT_EQ(expected_error, error); |
539 } | 537 } |
540 } | 538 } |
541 | |
542 } // namespace chrome | |
OLD | NEW |