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 "chrome/browser/drive/test_util.h" | 5 #include "chrome/browser/drive/test_util.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/drive/drive_api_util.h" | 8 #include "chrome/browser/drive/drive_api_util.h" |
9 #include "chrome/browser/drive/fake_drive_service.h" | 9 #include "chrome/browser/drive/fake_drive_service.h" |
10 #include "google_apis/drive/drive_api_parser.h" | 10 #include "google_apis/drive/drive_api_parser.h" |
11 #include "google_apis/drive/test_util.h" | 11 #include "google_apis/drive/test_util.h" |
12 | 12 |
13 using google_apis::FileResource; | 13 using google_apis::FileResource; |
14 using google_apis::GDATA_OTHER_ERROR; | 14 using google_apis::DRIVE_OTHER_ERROR; |
mtomasz
2015/01/29 06:18:02
nit: ditto
| |
15 using google_apis::GDataErrorCode; | 15 using google_apis::DriveApiErrorCode; |
16 using google_apis::HTTP_CREATED; | 16 using google_apis::HTTP_CREATED; |
17 | 17 |
18 namespace drive { | 18 namespace drive { |
19 namespace test_util { | 19 namespace test_util { |
20 | 20 |
21 bool SetUpTestEntries(FakeDriveService* drive_service) { | 21 bool SetUpTestEntries(FakeDriveService* drive_service) { |
22 GDataErrorCode error = GDATA_OTHER_ERROR; | 22 DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
23 scoped_ptr<FileResource> entry; | 23 scoped_ptr<FileResource> entry; |
24 | 24 |
25 drive_service->AddNewFileWithResourceId( | 25 drive_service->AddNewFileWithResourceId( |
26 "2_file_resource_id", | 26 "2_file_resource_id", |
27 "audio/mpeg", | 27 "audio/mpeg", |
28 "This is some test content.", | 28 "This is some test content.", |
29 drive_service->GetRootResourceId(), | 29 drive_service->GetRootResourceId(), |
30 "File 1.txt", | 30 "File 1.txt", |
31 false, // shared_with_me | 31 false, // shared_with_me |
32 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 32 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 192 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
193 base::RunLoop().RunUntilIdle(); | 193 base::RunLoop().RunUntilIdle(); |
194 if (error != HTTP_CREATED) | 194 if (error != HTTP_CREATED) |
195 return false; | 195 return false; |
196 | 196 |
197 return true; | 197 return true; |
198 } | 198 } |
199 | 199 |
200 } // namespace test_util | 200 } // namespace test_util |
201 } // namespace drive | 201 } // namespace drive |
OLD | NEW |