| 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_MODEL_ASSOCIATOR_MOCK_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/tracked.h" | |
| 10 #include "chrome/browser/sync/api/sync_error.h" | |
| 11 #include "chrome/browser/sync/glue/model_associator.h" | 9 #include "chrome/browser/sync/glue/model_associator.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 11 |
| 14 namespace browser_sync { | 12 namespace browser_sync { |
| 15 | 13 |
| 16 ACTION_P(SetSyncError, type) { | |
| 17 arg0->Reset(FROM_HERE, "test", type); | |
| 18 } | |
| 19 | |
| 20 class ModelAssociatorMock : public AssociatorInterface { | 14 class ModelAssociatorMock : public AssociatorInterface { |
| 21 public: | 15 public: |
| 22 ModelAssociatorMock(); | 16 ModelAssociatorMock(); |
| 23 virtual ~ModelAssociatorMock(); | 17 virtual ~ModelAssociatorMock(); |
| 24 | 18 |
| 25 MOCK_METHOD1(AssociateModels, bool(SyncError* error)); | 19 MOCK_METHOD0(AssociateModels, bool()); |
| 26 MOCK_METHOD1(DisassociateModels, bool(SyncError* error)); | 20 MOCK_METHOD0(DisassociateModels, bool()); |
| 27 MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes)); | 21 MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes)); |
| 28 MOCK_METHOD0(AbortAssociation, void()); | 22 MOCK_METHOD0(AbortAssociation, void()); |
| 29 MOCK_METHOD0(CryptoReadyIfNecessary, bool()); | 23 MOCK_METHOD0(CryptoReadyIfNecessary, bool()); |
| 30 }; | 24 }; |
| 31 | 25 |
| 32 } // namespace browser_sync | 26 } // namespace browser_sync |
| 33 | 27 |
| 34 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ | 28 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ |
| OLD | NEW |