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

Side by Side Diff: sync/notifier/registration_manager_unittest.cc

Issue 14113050: sync: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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
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 #include "sync/notifier/registration_manager.h" 5 #include "sync/notifier/registration_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstddef> 9 #include <cstddef>
10 #include <deque> 10 #include <deque>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 lost_ids, 220 lost_ids,
221 RegistrationManager::kMaxRegistrationDelaySeconds, 221 RegistrationManager::kMaxRegistrationDelaySeconds,
222 fake_registration_manager_.GetPendingRegistrationsForTest()); 222 fake_registration_manager_.GetPendingRegistrationsForTest());
223 } 223 }
224 224
225 FakeInvalidationClient fake_invalidation_client_; 225 FakeInvalidationClient fake_invalidation_client_;
226 FakeRegistrationManager fake_registration_manager_; 226 FakeRegistrationManager fake_registration_manager_;
227 227
228 private: 228 private:
229 // Needed by timers in RegistrationManager. 229 // Needed by timers in RegistrationManager.
230 MessageLoop message_loop_; 230 base::MessageLoop message_loop_;
231 231
232 DISALLOW_COPY_AND_ASSIGN(RegistrationManagerTest); 232 DISALLOW_COPY_AND_ASSIGN(RegistrationManagerTest);
233 }; 233 };
234 234
235 // Basic test of UpdateRegisteredIds to make sure we properly register 235 // Basic test of UpdateRegisteredIds to make sure we properly register
236 // new IDs and unregister any IDs no longer in the set. 236 // new IDs and unregister any IDs no longer in the set.
237 TEST_F(RegistrationManagerTest, UpdateRegisteredIds) { 237 TEST_F(RegistrationManagerTest, UpdateRegisteredIds) {
238 ObjectIdSet ids = GetSequenceOfIds(kObjectIdsCount - 1); 238 ObjectIdSet ids = GetSequenceOfIds(kObjectIdsCount - 1);
239 239
240 EXPECT_TRUE(fake_registration_manager_.GetRegisteredIdsForTest().empty()); 240 EXPECT_TRUE(fake_registration_manager_.GetRegisteredIdsForTest().empty());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 fake_registration_manager_.GetPendingRegistrationsForTest()); 424 fake_registration_manager_.GetPendingRegistrationsForTest());
425 425
426 fake_registration_manager_.MarkAllRegistrationsLost(); 426 fake_registration_manager_.MarkAllRegistrationsLost();
427 ExpectPendingRegistrations( 427 ExpectPendingRegistrations(
428 enabled_ids, 0.0, 428 enabled_ids, 0.0,
429 fake_registration_manager_.GetPendingRegistrationsForTest()); 429 fake_registration_manager_.GetPendingRegistrationsForTest());
430 } 430 }
431 431
432 } // namespace 432 } // namespace
433 } // namespace syncer 433 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/non_blocking_invalidator_unittest.cc ('k') | sync/notifier/sync_invalidation_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698