| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
| 6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
| 7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 MOCK_METHOD4(OnInitializationComplete, | 642 MOCK_METHOD4(OnInitializationComplete, |
| 643 void(const WeakHandle<JsBackend>&, | 643 void(const WeakHandle<JsBackend>&, |
| 644 const WeakHandle<DataTypeDebugInfoListener>&, | 644 const WeakHandle<DataTypeDebugInfoListener>&, |
| 645 bool, | 645 bool, |
| 646 syncer::ModelTypeSet)); // NOLINT | 646 syncer::ModelTypeSet)); // NOLINT |
| 647 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT | 647 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT |
| 648 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT | 648 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT |
| 649 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT | 649 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT |
| 650 MOCK_METHOD1(OnActionableError, | 650 MOCK_METHOD1(OnActionableError, |
| 651 void(const SyncProtocolError&)); // NOLINT | 651 void(const SyncProtocolError&)); // NOLINT |
| 652 MOCK_METHOD1(OnMigrationRequested, |
| 653 void(syncer::ModelTypeSet)); // NOLINT |
| 652 }; | 654 }; |
| 653 | 655 |
| 654 class SyncEncryptionHandlerObserverMock | 656 class SyncEncryptionHandlerObserverMock |
| 655 : public SyncEncryptionHandler::Observer { | 657 : public SyncEncryptionHandler::Observer { |
| 656 public: | 658 public: |
| 657 MOCK_METHOD2(OnPassphraseRequired, | 659 MOCK_METHOD2(OnPassphraseRequired, |
| 658 void(PassphraseRequiredReason, | 660 void(PassphraseRequiredReason, |
| 659 const sync_pb::EncryptedData&)); // NOLINT | 661 const sync_pb::EncryptedData&)); // NOLINT |
| 660 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT | 662 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT |
| 661 MOCK_METHOD2(OnBootstrapTokenUpdated, | 663 MOCK_METHOD2(OnBootstrapTokenUpdated, |
| (...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3180 // SyncManagerInitInvalidStorageTest::GetFactory will return | 3182 // SyncManagerInitInvalidStorageTest::GetFactory will return |
| 3181 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. | 3183 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. |
| 3182 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's | 3184 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's |
| 3183 // task is to ensure that SyncManagerImpl reported initialization failure in | 3185 // task is to ensure that SyncManagerImpl reported initialization failure in |
| 3184 // OnInitializationComplete callback. | 3186 // OnInitializationComplete callback. |
| 3185 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { | 3187 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { |
| 3186 EXPECT_FALSE(initialization_succeeded_); | 3188 EXPECT_FALSE(initialization_succeeded_); |
| 3187 } | 3189 } |
| 3188 | 3190 |
| 3189 } // namespace | 3191 } // namespace |
| OLD | NEW |