Chromium Code Reviews| 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) { |