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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/extensions/event_names.h" | 8 #include "chrome/browser/extensions/event_names.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" | |
11 #include "chrome/browser/sync_file_system/file_status_observer.h" | 10 #include "chrome/browser/sync_file_system/file_status_observer.h" |
12 #include "chrome/browser/sync_file_system/local_change_processor.h" | 11 #include "chrome/browser/sync_file_system/local_change_processor.h" |
13 #include "chrome/browser/sync_file_system/mock_remote_file_sync_service.h" | 12 #include "chrome/browser/sync_file_system/mock_remote_file_sync_service.h" |
14 #include "chrome/browser/sync_file_system/sync_file_system_service.h" | 13 #include "chrome/browser/sync_file_system/sync_file_system_service.h" |
15 #include "chrome/browser/sync_file_system/sync_file_system_service_factory.h" | 14 #include "chrome/browser/sync_file_system/sync_file_system_service_factory.h" |
16 #include "chrome/common/chrome_version_info.h" | 15 #include "chrome/common/chrome_version_info.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "webkit/browser/fileapi/file_system_url.h" | 18 #include "webkit/browser/fileapi/file_system_url.h" |
20 #include "webkit/browser/fileapi/syncable/sync_status_code.h" | 19 #include "webkit/browser/fileapi/syncable/sync_status_code.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 77 } |
79 | 78 |
80 ACTION_P5(ReturnWithFakeFileAddedStatus, | 79 ACTION_P5(ReturnWithFakeFileAddedStatus, |
81 origin, | 80 origin, |
82 mock_remote_service, | 81 mock_remote_service, |
83 sync_direction, | 82 sync_direction, |
84 sync_file_status, | 83 sync_file_status, |
85 sync_action_taken) { | 84 sync_action_taken) { |
86 FileSystemURL mock_url = sync_file_system::CreateSyncableFileSystemURL( | 85 FileSystemURL mock_url = sync_file_system::CreateSyncableFileSystemURL( |
87 *origin, | 86 *origin, |
88 sync_file_system::DriveFileSyncService::kServiceName, | 87 sync_file_system::SyncFileSystemService::GetDefaultServiceName(), |
89 base::FilePath(FILE_PATH_LITERAL("foo.txt"))); | 88 base::FilePath(FILE_PATH_LITERAL("foo.txt"))); |
90 mock_remote_service->NotifyRemoteChangeQueueUpdated(0); | 89 mock_remote_service->NotifyRemoteChangeQueueUpdated(0); |
91 base::MessageLoopProxy::current()->PostTask( | 90 base::MessageLoopProxy::current()->PostTask( |
92 FROM_HERE, base::Bind(arg0, | 91 FROM_HERE, base::Bind(arg0, |
93 sync_file_system::SYNC_STATUS_OK, | 92 sync_file_system::SYNC_STATUS_OK, |
94 mock_url)); | 93 mock_url)); |
95 mock_remote_service->NotifyFileStatusChanged( | 94 mock_remote_service->NotifyFileStatusChanged( |
96 mock_url, sync_direction, sync_file_status, sync_action_taken); | 95 mock_url, sync_direction, sync_file_status, sync_action_taken); |
97 } | 96 } |
98 | 97 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/write_file_then_get_usage")) | 186 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/write_file_then_get_usage")) |
188 << message_; | 187 << message_; |
189 } | 188 } |
190 | 189 |
191 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, ConflictResolutionPolicy) { | 190 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, ConflictResolutionPolicy) { |
192 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy")) | 191 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy")) |
193 << message_; | 192 << message_; |
194 } | 193 } |
195 | 194 |
196 } // namespace chrome | 195 } // namespace chrome |
OLD | NEW |