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 "chrome/browser/sync_file_system/drive_backend_v1/api_util.h" | 5 #include "chrome/browser/sync_file_system/drive_backend_v1/api_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 public: | 56 public: |
57 APIUtilTest() : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), | 57 APIUtilTest() : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), |
58 fake_drive_service_(NULL), | 58 fake_drive_service_(NULL), |
59 fake_drive_uploader_(NULL) {} | 59 fake_drive_uploader_(NULL) {} |
60 | 60 |
61 virtual void SetUp() OVERRIDE { | 61 virtual void SetUp() OVERRIDE { |
62 fake_drive_service_ = new FakeDriveServiceWrapper; | 62 fake_drive_service_ = new FakeDriveServiceWrapper; |
63 fake_drive_uploader_ = new FakeDriveUploader(fake_drive_service_); | 63 fake_drive_uploader_ = new FakeDriveUploader(fake_drive_service_); |
64 | 64 |
65 fake_drive_helper_.reset(new FakeDriveServiceHelper( | 65 fake_drive_helper_.reset(new FakeDriveServiceHelper( |
66 fake_drive_service_, fake_drive_uploader_)); | 66 fake_drive_service_, fake_drive_uploader_, |
| 67 APIUtil::GetSyncRootDirectoryName())); |
67 | 68 |
68 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 69 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
69 api_util_ = APIUtil::CreateForTesting( | 70 api_util_ = APIUtil::CreateForTesting( |
70 temp_dir_.path(), | 71 temp_dir_.path(), |
71 scoped_ptr<DriveServiceInterface>(fake_drive_service_), | 72 scoped_ptr<DriveServiceInterface>(fake_drive_service_), |
72 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)); | 73 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)); |
73 | 74 |
74 fake_drive_service_->LoadResourceListForWapi( | 75 fake_drive_service_->LoadResourceListForWapi( |
75 "sync_file_system/initialize.json"); | 76 "sync_file_system/initialize.json"); |
76 } | 77 } |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 TestCreateDirectory(); | 827 TestCreateDirectory(); |
827 } | 828 } |
828 | 829 |
829 TEST_F(APIUtilTest, CreateDirectory_WAPI) { | 830 TEST_F(APIUtilTest, CreateDirectory_WAPI) { |
830 ScopedDisableDriveAPI disable_drive_api; | 831 ScopedDisableDriveAPI disable_drive_api; |
831 TestCreateDirectory(); | 832 TestCreateDirectory(); |
832 } | 833 } |
833 | 834 |
834 } // namespace drive_backend | 835 } // namespace drive_backend |
835 } // namespace sync_file_system | 836 } // namespace sync_file_system |
OLD | NEW |