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

Unified Diff: sync/notifier/p2p_invalidator_unittest.cc

Issue 12847003: Separate invalidator and sync client ID (part 2/2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_listen_notifications utility Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/notifier/p2p_invalidator.cc ('k') | sync/notifier/sync_invalidation_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/p2p_invalidator_unittest.cc
diff --git a/sync/notifier/p2p_invalidator_unittest.cc b/sync/notifier/p2p_invalidator_unittest.cc
index 31a180e0079e8365b53d07d1d9a967f1ce116ff1..1b7aad45ede5d6b3f7b03a7b45209b0fa630be27 100644
--- a/sync/notifier/p2p_invalidator_unittest.cc
+++ b/sync/notifier/p2p_invalidator_unittest.cc
@@ -27,6 +27,7 @@ class P2PInvalidatorTestDelegate {
}
void CreateInvalidator(
+ const std::string& invalidator_client_id,
const std::string& initial_state,
const base::WeakPtr<InvalidationStateTracker>&
invalidation_state_tracker) {
@@ -36,6 +37,7 @@ class P2PInvalidatorTestDelegate {
invalidator_.reset(
new P2PInvalidator(
scoped_ptr<notifier::PushClient>(fake_push_client_),
+ invalidator_client_id,
NOTIFY_OTHERS));
}
@@ -84,7 +86,8 @@ class P2PInvalidatorTest : public testing::Test {
protected:
P2PInvalidatorTest()
: next_sent_notification_to_reflect_(0) {
- delegate_.CreateInvalidator("fake_state",
+ delegate_.CreateInvalidator("sender",
+ "fake_state",
base::WeakPtr<InvalidationStateTracker>());
delegate_.GetInvalidator()->RegisterHandler(&fake_handler_);
}
@@ -214,8 +217,6 @@ TEST_F(P2PInvalidatorTest, NotificationsBasic) {
invalidator->UpdateRegisteredIds(&fake_handler_,
ModelTypeSetToObjectIdSet(enabled_types));
- invalidator->SetUniqueId("sender");
-
const char kEmail[] = "foo@bar.com";
const char kToken[] = "token";
invalidator->UpdateCredentials(kEmail, kToken);
@@ -272,7 +273,6 @@ TEST_F(P2PInvalidatorTest, SendNotificationData) {
invalidator->UpdateRegisteredIds(&fake_handler_,
ModelTypeSetToObjectIdSet(enabled_types));
- invalidator->SetUniqueId("sender");
invalidator->UpdateCredentials("foo@bar.com", "fake_token");
ReflectSentNotifications();
« no previous file with comments | « sync/notifier/p2p_invalidator.cc ('k') | sync/notifier/sync_invalidation_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698