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 "webkit/fileapi/syncable/local_file_sync_context.h" | 5 #include "webkit/browser/fileapi/syncable/local_file_sync_context.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "webkit/blob/mock_blob_url_request_context.h" | 18 #include "webkit/blob/mock_blob_url_request_context.h" |
19 #include "webkit/browser/fileapi/file_system_context.h" | 19 #include "webkit/browser/fileapi/file_system_context.h" |
20 #include "webkit/browser/fileapi/file_system_operation.h" | 20 #include "webkit/browser/fileapi/file_system_operation.h" |
21 #include "webkit/browser/fileapi/isolated_context.h" | 21 #include "webkit/browser/fileapi/isolated_context.h" |
22 #include "webkit/fileapi/syncable/canned_syncable_file_system.h" | 22 #include "webkit/browser/fileapi/syncable/canned_syncable_file_system.h" |
23 #include "webkit/fileapi/syncable/file_change.h" | 23 #include "webkit/browser/fileapi/syncable/file_change.h" |
24 #include "webkit/fileapi/syncable/local_file_change_tracker.h" | 24 #include "webkit/browser/fileapi/syncable/local_file_change_tracker.h" |
25 #include "webkit/fileapi/syncable/sync_file_metadata.h" | 25 #include "webkit/browser/fileapi/syncable/sync_file_metadata.h" |
26 #include "webkit/fileapi/syncable/sync_status_code.h" | 26 #include "webkit/browser/fileapi/syncable/sync_status_code.h" |
27 #include "webkit/fileapi/syncable/syncable_file_system_util.h" | 27 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h" |
28 | 28 |
29 #define FPL FILE_PATH_LITERAL | 29 #define FPL FILE_PATH_LITERAL |
30 | 30 |
31 using fileapi::FileSystemContext; | 31 using fileapi::FileSystemContext; |
32 using fileapi::FileSystemURL; | 32 using fileapi::FileSystemURL; |
33 using fileapi::FileSystemURLSet; | 33 using fileapi::FileSystemURLSet; |
34 | 34 |
35 // This tests LocalFileSyncContext behavior in multi-thread / | 35 // This tests LocalFileSyncContext behavior in multi-thread / |
36 // multi-file-system-context environment. | 36 // multi-file-system-context environment. |
37 // Basic combined tests (single-thread / single-file-system-context) | 37 // Basic combined tests (single-thread / single-file-system-context) |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | 672 |
673 // Make sure kDir and kFile are created by ApplyRemoteChange. | 673 // Make sure kDir and kFile are created by ApplyRemoteChange. |
674 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile)); | 674 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.FileExists(kFile)); |
675 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.DirectoryExists(kDir)); | 675 EXPECT_EQ(base::PLATFORM_FILE_OK, file_system.DirectoryExists(kDir)); |
676 | 676 |
677 sync_context_->ShutdownOnUIThread(); | 677 sync_context_->ShutdownOnUIThread(); |
678 file_system.TearDown(); | 678 file_system.TearDown(); |
679 } | 679 } |
680 | 680 |
681 } // namespace sync_file_system | 681 } // namespace sync_file_system |
OLD | NEW |