OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "chrome/browser/sync/glue/sync_backend_host.h" | 11 #include "chrome/browser/sync/glue/sync_backend_host.h" |
12 #include "base/task.h" | 12 #include "base/task.h" |
13 #include "chrome/browser/sync/profile_sync_test_util.h" | 13 #include "chrome/browser/sync/profile_sync_test_util.h" |
14 #include "chrome/common/notification_type.h" | 14 #include "chrome/common/notification_type.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 | 16 |
17 namespace browser_sync { | 17 namespace browser_sync { |
18 | 18 |
19 ACTION(InvokeTask) { | |
20 arg1->Run(); | |
21 delete arg1; | |
22 } | |
23 | |
24 class SyncBackendHostMock : public SyncBackendHost { | 19 class SyncBackendHostMock : public SyncBackendHost { |
25 public: | 20 public: |
26 SyncBackendHostMock(); | 21 SyncBackendHostMock(); |
27 virtual ~SyncBackendHostMock(); | 22 virtual ~SyncBackendHostMock(); |
28 | 23 |
29 MOCK_METHOD2(ConfigureDataTypes, | 24 MOCK_METHOD3(ConfigureDataTypes, |
30 void(const std::set<syncable::ModelType>&, CancelableTask*)); | 25 void(const DataTypeController::TypeMap&, |
| 26 const std::set<syncable::ModelType>&, CancelableTask*)); |
31 MOCK_METHOD0(RequestPause, bool()); | 27 MOCK_METHOD0(RequestPause, bool()); |
32 MOCK_METHOD0(RequestResume, bool()); | 28 MOCK_METHOD0(RequestResume, bool()); |
33 MOCK_METHOD0(StartSyncingWithServer, void()); | 29 MOCK_METHOD0(StartSyncingWithServer, void()); |
34 }; | 30 }; |
35 | 31 |
36 } // namespace browser_sync | 32 } // namespace browser_sync |
37 | 33 |
38 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ | 34 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H__ |
OLD | NEW |