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 // This file contains mocks for classes in drive_service_interface.h | 5 // This file contains mocks for classes in drive_service_interface.h |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ |
8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ | 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" | 14 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 | 16 |
17 class FilePath; | 17 class FilePath; |
18 | 18 |
19 namespace gdata { | 19 namespace gdata { |
20 | 20 |
21 class MockDriveService : public DriveServiceInterface { | 21 class MockDriveService : public DriveServiceInterface { |
22 public: | 22 public: |
23 // DriveService is usually owned and created by GDataFileSystem. | 23 // DriveService is usually owned and created by GDataFileSystem. |
24 MockDriveService(); | 24 MockDriveService(); |
25 virtual ~MockDriveService(); | 25 virtual ~MockDriveService(); |
26 | 26 |
27 // DriveServiceInterface overrides. | 27 // DriveServiceInterface overrides. |
28 MOCK_METHOD1(Initialize, void(Profile* profile)); | 28 MOCK_METHOD1(Initialize, void(Profile* profile)); |
29 MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*()); | 29 MOCK_CONST_METHOD0(operation_registry, OperationRegistry*()); |
30 MOCK_METHOD0(CancelAll, void(void)); | 30 MOCK_METHOD0(CancelAll, void(void)); |
31 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); | 31 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); |
32 MOCK_METHOD5(GetDocuments, void(const GURL& feed_url, | 32 MOCK_METHOD5(GetDocuments, void(const GURL& feed_url, |
33 int64 start_changestamp, | 33 int64 start_changestamp, |
34 const std::string& search_string, | 34 const std::string& search_string, |
35 const std::string& directory_resource_id, | 35 const std::string& directory_resource_id, |
36 const GetDataCallback& callback)); | 36 const GetDataCallback& callback)); |
37 MOCK_METHOD2(GetDocumentEntry, void(const std::string& resource_id, | 37 MOCK_METHOD2(GetDocumentEntry, void(const std::string& resource_id, |
38 const GetDataCallback& callback)); | 38 const GetDataCallback& callback)); |
39 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback)); | 39 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback)); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 scoped_ptr<base::Value> search_result_; | 186 scoped_ptr<base::Value> search_result_; |
187 | 187 |
188 // File data to be written to the local temporary file when | 188 // File data to be written to the local temporary file when |
189 // DownloadDocumentStub is called. | 189 // DownloadDocumentStub is called. |
190 scoped_ptr<std::string> file_data_; | 190 scoped_ptr<std::string> file_data_; |
191 }; | 191 }; |
192 | 192 |
193 } // namespace gdata | 193 } // namespace gdata |
194 | 194 |
195 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ | 195 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ |
OLD | NEW |