OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/drive/directory_loader.h" | 5 #include "components/drive/directory_loader.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 scoped_ptr<google_apis::FileResource> entry; | 115 scoped_ptr<google_apis::FileResource> entry; |
116 drive_service_->AddNewFile( | 116 drive_service_->AddNewFile( |
117 "text/plain", | 117 "text/plain", |
118 "content text", | 118 "content text", |
119 drive_service_->GetRootResourceId(), | 119 drive_service_->GetRootResourceId(), |
120 title, | 120 title, |
121 false, // shared_with_me | 121 false, // shared_with_me |
122 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 122 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
123 base::RunLoop().RunUntilIdle(); | 123 base::RunLoop().RunUntilIdle(); |
124 EXPECT_EQ(google_apis::HTTP_CREATED, error); | 124 EXPECT_EQ(google_apis::HTTP_CREATED, error); |
125 return entry.Pass(); | 125 return entry; |
126 } | 126 } |
127 | 127 |
128 content::TestBrowserThreadBundle thread_bundle_; | 128 content::TestBrowserThreadBundle thread_bundle_; |
129 base::ScopedTempDir temp_dir_; | 129 base::ScopedTempDir temp_dir_; |
130 scoped_ptr<TestingPrefServiceSimple> pref_service_; | 130 scoped_ptr<TestingPrefServiceSimple> pref_service_; |
131 scoped_ptr<EventLogger> logger_; | 131 scoped_ptr<EventLogger> logger_; |
132 scoped_ptr<FakeDriveService> drive_service_; | 132 scoped_ptr<FakeDriveService> drive_service_; |
133 scoped_ptr<JobScheduler> scheduler_; | 133 scoped_ptr<JobScheduler> scheduler_; |
134 scoped_ptr<ResourceMetadataStorage, | 134 scoped_ptr<ResourceMetadataStorage, |
135 test_util::DestroyHelperForTests> metadata_storage_; | 135 test_util::DestroyHelperForTests> metadata_storage_; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 // Unlock the loader, this should resume the pending udpate. | 245 // Unlock the loader, this should resume the pending udpate. |
246 lock.reset(); | 246 lock.reset(); |
247 base::RunLoop().RunUntilIdle(); | 247 base::RunLoop().RunUntilIdle(); |
248 EXPECT_EQ(1U, observer.changed_directories().count( | 248 EXPECT_EQ(1U, observer.changed_directories().count( |
249 util::GetDriveMyDriveRootPath())); | 249 util::GetDriveMyDriveRootPath())); |
250 } | 250 } |
251 | 251 |
252 } // namespace internal | 252 } // namespace internal |
253 } // namespace drive | 253 } // namespace drive |
OLD | NEW |