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

Unified Diff: sync/notifier/p2p_invalidator_unittest.cc

Issue 12092091: Separate sync and invalidation client IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/protocol/sync.proto » ('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 577630fe8dd17ae10a4d72a9b3be259cad8fa75a..42e32369befc384f70bc664e74e50287381f198b 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));
}
@@ -85,7 +87,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_);
}
@@ -216,8 +219,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);
@@ -275,7 +276,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/protocol/sync.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698