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 // 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 MOCK_METHOD1(OnAuthError, void(const GoogleServiceAuthError&)); // NOLINT | 624 MOCK_METHOD1(OnAuthError, void(const GoogleServiceAuthError&)); // NOLINT |
625 MOCK_METHOD1(OnPassphraseRequired, | 625 MOCK_METHOD1(OnPassphraseRequired, |
626 void(sync_api::PassphraseRequiredReason)); // NOLINT | 626 void(sync_api::PassphraseRequiredReason)); // NOLINT |
627 MOCK_METHOD1(OnPassphraseAccepted, void(const std::string&)); // NOLINT | 627 MOCK_METHOD1(OnPassphraseAccepted, void(const std::string&)); // NOLINT |
628 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT | 628 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT |
629 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT | 629 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT |
630 MOCK_METHOD0(OnClearServerDataFailed, void()); // NOLINT | 630 MOCK_METHOD0(OnClearServerDataFailed, void()); // NOLINT |
631 MOCK_METHOD0(OnClearServerDataSucceeded, void()); // NOLINT | 631 MOCK_METHOD0(OnClearServerDataSucceeded, void()); // NOLINT |
632 MOCK_METHOD1(OnEncryptionComplete, void(const ModelTypeSet&)); // NOLINT | 632 MOCK_METHOD1(OnEncryptionComplete, void(const ModelTypeSet&)); // NOLINT |
633 MOCK_METHOD1(OnActionableError, | 633 MOCK_METHOD1(OnActionableError, |
634 void(const browser_sync::SyncProtocolError&)); // NOLINT | 634 void(const browser_sync::SyncOperationResult&)); // NOLINT |
635 }; | 635 }; |
636 | 636 |
637 class SyncNotifierMock : public sync_notifier::SyncNotifier { | 637 class SyncNotifierMock : public sync_notifier::SyncNotifier { |
638 public: | 638 public: |
639 MOCK_METHOD1(AddObserver, void(sync_notifier::SyncNotifierObserver*)); | 639 MOCK_METHOD1(AddObserver, void(sync_notifier::SyncNotifierObserver*)); |
640 MOCK_METHOD1(RemoveObserver, void(sync_notifier::SyncNotifierObserver*)); | 640 MOCK_METHOD1(RemoveObserver, void(sync_notifier::SyncNotifierObserver*)); |
641 MOCK_METHOD1(SetUniqueId, void(const std::string&)); | 641 MOCK_METHOD1(SetUniqueId, void(const std::string&)); |
642 MOCK_METHOD1(SetState, void(const std::string&)); | 642 MOCK_METHOD1(SetState, void(const std::string&)); |
643 MOCK_METHOD2(UpdateCredentials, | 643 MOCK_METHOD2(UpdateCredentials, |
644 void(const std::string&, const std::string&)); | 644 void(const std::string&, const std::string&)); |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); | 1469 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); |
1470 // We should de-canonicalize the title in GetTitle(), but the title in the | 1470 // We should de-canonicalize the title in GetTitle(), but the title in the |
1471 // specifics should be stored in the server legal form. | 1471 // specifics should be stored in the server legal form. |
1472 EXPECT_EQ(raw_title2, node2.GetTitle()); | 1472 EXPECT_EQ(raw_title2, node2.GetTitle()); |
1473 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); | 1473 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); |
1474 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); | 1474 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); |
1475 } | 1475 } |
1476 } | 1476 } |
1477 | 1477 |
1478 } // namespace browser_sync | 1478 } // namespace browser_sync |
OLD | NEW |