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 gdata_documents_service.h | 5 // This file contains mocks for classes in gdata_documents_service.h |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 15 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
16 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" | 16 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 | 18 |
19 class FilePath; | 19 class FilePath; |
20 | 20 |
21 namespace gdata { | 21 namespace gdata { |
22 | 22 |
23 class MockDocumentsService : public DocumentsServiceInterface { | 23 class MockDocumentsService : public DocumentsServiceInterface { |
24 public: | 24 public: |
25 // DocumentsService is usually owned and created by GDataFileSystem. | 25 // DocumentsService is usually owned and created by GDataFileSystem. |
26 MockDocumentsService(); | 26 MockDocumentsService(); |
27 virtual ~MockDocumentsService(); | 27 virtual ~MockDocumentsService(); |
28 | 28 |
29 // DocumentServiceInterface overrides. | 29 // DocumentServiceInterface overrides. |
30 MOCK_METHOD1(Initialize, void(Profile* profile)); | 30 MOCK_METHOD2(Initialize, void(Profile* profile, bool use_drive_api)); |
31 MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*()); | 31 MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*()); |
32 MOCK_METHOD0(CancelAll, void(void)); | 32 MOCK_METHOD0(CancelAll, void(void)); |
33 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); | 33 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); |
34 MOCK_METHOD3(GetDocuments, void(const GURL& feed_url, | 34 MOCK_METHOD3(GetDocuments, void(const GURL& feed_url, |
35 const GetDocumentsOptions& options, | 35 const GetDocumentsOptions& options, |
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)); |
40 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url, | 40 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 scoped_ptr<base::Value> search_result_; | 181 scoped_ptr<base::Value> search_result_; |
182 | 182 |
183 // File data to be written to the local temporary file when | 183 // File data to be written to the local temporary file when |
184 // DownloadDocumentStub is called. | 184 // DownloadDocumentStub is called. |
185 scoped_ptr<std::string> file_data_; | 185 scoped_ptr<std::string> file_data_; |
186 }; | 186 }; |
187 | 187 |
188 } // namespace gdata | 188 } // namespace gdata |
189 | 189 |
190 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ | 190 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ |
OLD | NEW |