diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 11:33:48 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 11:33:48 +0000 |
commit | 8cae971cd38b72634e99d96de767aabb2b1ada58 (patch) | |
tree | f6a1cfcf98df4baef4bcdb14f50fb7dd074547fd /sync/notifier | |
parent | 070ff3fb2915801f20138c95858836e845b7debb (diff) | |
download | chromium_src-8cae971cd38b72634e99d96de767aabb2b1ada58.zip chromium_src-8cae971cd38b72634e99d96de767aabb2b1ada58.tar.gz chromium_src-8cae971cd38b72634e99d96de767aabb2b1ada58.tar.bz2 |
sync: Update calls from RunAllPending() to RunUntilIdle().
RunAllPending() is deprecated and we should switch to RunUntilIdle().
BUG=131220
TBR=akalin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11275305
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/notifier')
5 files changed, 11 insertions, 11 deletions
diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc index 5b5f8fa..2ceb509 100644 --- a/sync/notifier/invalidation_notifier_unittest.cc +++ b/sync/notifier/invalidation_notifier_unittest.cc @@ -56,12 +56,12 @@ class InvalidationNotifierTestDelegate { // another task, so they must be run in order to avoid leaking the inner // task. Stopping does not schedule any tasks, so it's both necessary and // sufficient to drain the task queue before stopping the notifier. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); invalidator_.reset(); } void WaitForInvalidator() { - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } void TriggerOnInvalidatorStateChange(InvalidatorState state) { diff --git a/sync/notifier/invalidator_factory_unittest.cc b/sync/notifier/invalidator_factory_unittest.cc index 48c4b564c..77230ed 100644 --- a/sync/notifier/invalidator_factory_unittest.cc +++ b/sync/notifier/invalidator_factory_unittest.cc @@ -33,7 +33,7 @@ class InvalidatorFactoryTest : public testing::Test { } virtual void TearDown() OVERRIDE { - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(0, fake_handler_.GetInvalidationCount()); } diff --git a/sync/notifier/non_blocking_invalidator_unittest.cc b/sync/notifier/non_blocking_invalidator_unittest.cc index f2a44abe..412c6b6 100644 --- a/sync/notifier/non_blocking_invalidator_unittest.cc +++ b/sync/notifier/non_blocking_invalidator_unittest.cc @@ -63,7 +63,7 @@ class NonBlockingInvalidatorTestDelegate { invalidator_.reset(); request_context_getter_ = NULL; io_thread_.Stop(); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } void WaitForInvalidator() { diff --git a/sync/notifier/sync_invalidation_listener_unittest.cc b/sync/notifier/sync_invalidation_listener_unittest.cc index 2de36c8..634ac40 100644 --- a/sync/notifier/sync_invalidation_listener_unittest.cc +++ b/sync/notifier/sync_invalidation_listener_unittest.cc @@ -249,7 +249,7 @@ class SyncInvalidationListenerTest : public testing::Test { EXPECT_TRUE(fake_invalidation_client_->IsAckedHandle(ack_handle)); // Pump message loop to trigger // InvalidationStateTracker::SetMaxVersion(). - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } // |payload| can be NULL, but not |type_name|. @@ -272,7 +272,7 @@ class SyncInvalidationListenerTest : public testing::Test { client_.WriteState(new_state); // Pump message loop to trigger // InvalidationStateTracker::WriteState(). - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } void EnableNotifications() { @@ -309,7 +309,7 @@ class SyncInvalidationListenerTest : public testing::Test { // avoid leaking the inner task. client_.StopForTest() does not // schedule any tasks, so it's both necessary and sufficient to // drain the task queue before calling it. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); fake_invalidation_client_ = NULL; client_.StopForTest(); } diff --git a/sync/notifier/sync_system_resources_unittest.cc b/sync/notifier/sync_system_resources_unittest.cc index 314f728..77423b3 100644 --- a/sync/notifier/sync_system_resources_unittest.cc +++ b/sync/notifier/sync_system_resources_unittest.cc @@ -133,7 +133,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleImmediately) { EXPECT_CALL(mock_closure, Run()); sync_system_resources_.internal_scheduler()->Schedule( invalidation::Scheduler::NoDelay(), mock_closure.CreateClosure()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } TEST_F(SyncSystemResourcesTest, ScheduleOnListenerThread) { @@ -144,7 +144,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleOnListenerThread) { invalidation::Scheduler::NoDelay(), mock_closure.CreateClosure()); EXPECT_TRUE( sync_system_resources_.internal_scheduler()->IsRunningOnThread()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } TEST_F(SyncSystemResourcesTest, ScheduleWithZeroDelay) { @@ -153,7 +153,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleWithZeroDelay) { EXPECT_CALL(mock_closure, Run()); sync_system_resources_.internal_scheduler()->Schedule( invalidation::TimeDelta::FromSeconds(0), mock_closure.CreateClosure()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } // TODO(akalin): Figure out how to test with a non-zero delay. @@ -169,7 +169,7 @@ TEST_F(SyncSystemResourcesTest, WriteState) { .WillOnce(SaveArg<0>(&results)); sync_system_resources_.storage()->WriteKey( "", "state", mock_storage_callback.CreateCallback()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(invalidation::Status(invalidation::Status::SUCCESS, ""), results); } |