Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: sync/internal_api/syncapi_unittest.cc

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager.cc ('k') | sync/protocol/get_updates_caller_info.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 MOCK_METHOD2(OnInitializationComplete, 691 MOCK_METHOD2(OnInitializationComplete,
692 void(const WeakHandle<JsBackend>&, bool)); // NOLINT 692 void(const WeakHandle<JsBackend>&, bool)); // NOLINT
693 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT 693 MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT
694 MOCK_METHOD2(OnPassphraseRequired, 694 MOCK_METHOD2(OnPassphraseRequired,
695 void(sync_api::PassphraseRequiredReason, 695 void(sync_api::PassphraseRequiredReason,
696 const sync_pb::EncryptedData&)); // NOLINT 696 const sync_pb::EncryptedData&)); // NOLINT
697 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT 697 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT
698 MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT 698 MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT
699 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT 699 MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT
700 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT 700 MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT
701 MOCK_METHOD0(OnClearServerDataFailed, void()); // NOLINT
702 MOCK_METHOD0(OnClearServerDataSucceeded, void()); // NOLINT
703 MOCK_METHOD2(OnEncryptedTypesChanged, 701 MOCK_METHOD2(OnEncryptedTypesChanged,
704 void(ModelTypeSet, bool)); // NOLINT 702 void(ModelTypeSet, bool)); // NOLINT
705 MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT 703 MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT
706 MOCK_METHOD1(OnActionableError, 704 MOCK_METHOD1(OnActionableError,
707 void(const browser_sync::SyncProtocolError&)); // NOLINT 705 void(const browser_sync::SyncProtocolError&)); // NOLINT
708 }; 706 };
709 707
710 class SyncNotifierMock : public sync_notifier::SyncNotifier { 708 class SyncNotifierMock : public sync_notifier::SyncNotifier {
711 public: 709 public:
712 MOCK_METHOD1(AddObserver, void(sync_notifier::SyncNotifierObserver*)); 710 MOCK_METHOD1(AddObserver, void(sync_notifier::SyncNotifierObserver*));
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 EXPECT_EQ(title, node.GetTitle()); 2502 EXPECT_EQ(title, node.GetTitle());
2505 EXPECT_EQ(GURL(url2), node.GetURL()); 2503 EXPECT_EQ(GURL(url2), node.GetURL());
2506 const syncable::Entry* node_entry = node.GetEntry(); 2504 const syncable::Entry* node_entry = node.GetEntry();
2507 EXPECT_EQ(kEncryptedString, node_entry->Get(NON_UNIQUE_NAME)); 2505 EXPECT_EQ(kEncryptedString, node_entry->Get(NON_UNIQUE_NAME));
2508 const sync_pb::EntitySpecifics& specifics = node_entry->Get(SPECIFICS); 2506 const sync_pb::EntitySpecifics& specifics = node_entry->Get(SPECIFICS);
2509 EXPECT_TRUE(specifics.has_encrypted()); 2507 EXPECT_TRUE(specifics.has_encrypted());
2510 } 2508 }
2511 } 2509 }
2512 2510
2513 } // namespace browser_sync 2511 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager.cc ('k') | sync/protocol/get_updates_caller_info.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698