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

Unified Diff: sync/notifier/sync_invalidation_listener_unittest.cc

Issue 12094113: Migrate invalidator client IDs out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review-related changes Created 7 years, 10 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
« chrome/common/pref_names.cc ('K') | « sync/notifier/sync_invalidation_listener.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/sync_invalidation_listener_unittest.cc
diff --git a/sync/notifier/sync_invalidation_listener_unittest.cc b/sync/notifier/sync_invalidation_listener_unittest.cc
index 4ab5b99e732f0a750896d0185cd6701d01b9965a..445f4ef933098c36b4fff083b91b2afd7788b23e 100644
--- a/sync/notifier/sync_invalidation_listener_unittest.cc
+++ b/sync/notifier/sync_invalidation_listener_unittest.cc
@@ -226,6 +226,10 @@ class SyncInvalidationListenerTest : public testing::Test {
return fake_tracker_.GetMaxVersion(id);
}
+ std::string GetInvalidatorClientId() const {
+ return fake_tracker_.GetInvalidatorClientId();
+ }
+
std::string GetBootstrapData() const {
return fake_tracker_.GetBootstrapData();
}
@@ -300,6 +304,11 @@ class SyncInvalidationListenerTest : public testing::Test {
MakeWeakHandle(fake_tracker_.AsWeakPtr()),
&fake_delegate_);
DCHECK(fake_invalidation_client_);
+
+ // TODO(rlarocque, 124142): This is necessary for the deferred write of the
tim (not reviewing) 2013/02/05 22:05:28 todo fixup here too (and elsewhere in patch) :)
rlarocque 2013/02/05 22:16:45 Done. I think I got them all this time.
+ // client ID to take place. We can remove this statement when we remove the
+ // WriteInvalidatorClientId test.
+ message_loop_.RunUntilIdle();
}
void StopClient() {
@@ -326,6 +335,13 @@ class SyncInvalidationListenerTest : public testing::Test {
SyncInvalidationListener client_;
};
+// Verify the client ID is written to the state tracker on client start.
+// TODO(rlarocque, 124142): Remove this test when migration code is removed.
+TEST_F(SyncInvalidationListenerTest, WriteInvalidatorClientId) {
+ // The client is started by the harness, so we don't have to do anything here.
+ EXPECT_EQ(kClientId, GetInvalidatorClientId());
+}
+
// Write a new state to the client. It should propagate to the
// tracker.
TEST_F(SyncInvalidationListenerTest, WriteState) {
« chrome/common/pref_names.cc ('K') | « sync/notifier/sync_invalidation_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698