summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 11:33:48 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 11:33:48 +0000
commit8cae971cd38b72634e99d96de767aabb2b1ada58 (patch)
treef6a1cfcf98df4baef4bcdb14f50fb7dd074547fd /sync
parent070ff3fb2915801f20138c95858836e845b7debb (diff)
downloadchromium_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')
-rw-r--r--sync/engine/sync_scheduler_unittest.cc6
-rw-r--r--sync/internal_api/js_mutation_event_observer_unittest.cc2
-rw-r--r--sync/internal_api/js_sync_encryption_handler_observer_unittest.cc2
-rw-r--r--sync/internal_api/js_sync_manager_observer_unittest.cc2
-rw-r--r--sync/internal_api/public/util/weak_handle_unittest.cc2
-rw-r--r--sync/internal_api/sync_encryption_handler_impl_unittest.cc2
-rw-r--r--sync/internal_api/sync_manager_impl_unittest.cc2
-rw-r--r--sync/js/sync_js_controller_unittest.cc2
-rw-r--r--sync/notifier/invalidation_notifier_unittest.cc4
-rw-r--r--sync/notifier/invalidator_factory_unittest.cc2
-rw-r--r--sync/notifier/non_blocking_invalidator_unittest.cc2
-rw-r--r--sync/notifier/sync_invalidation_listener_unittest.cc6
-rw-r--r--sync/notifier/sync_system_resources_unittest.cc8
13 files changed, 21 insertions, 21 deletions
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index b834822..601d3b4 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -1125,12 +1125,12 @@ TEST_F(SyncSchedulerTest, StartWhenNotConnected) {
scheduler()->ScheduleNudgeAsync(
zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE);
// Should save the nudge for until after the server is reachable.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
connection()->SetServerReachable();
connection()->UpdateConnectionStatus();
scheduler()->OnConnectionStatusChange();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
}
TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) {
@@ -1158,7 +1158,7 @@ TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) {
connection()->SetServerReachable();
connection()->UpdateConnectionStatus();
scheduler()->OnConnectionStatusChange();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
}
TEST_F(SyncSchedulerTest, ConnectionChangeCanaryPreemptedByNudge) {
diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc
index 91e10b3..943028a 100644
--- a/sync/internal_api/js_mutation_event_observer_unittest.cc
+++ b/sync/internal_api/js_mutation_event_observer_unittest.cc
@@ -36,7 +36,7 @@ class JsMutationEventObserverTest : public testing::Test {
JsMutationEventObserver js_mutation_event_observer_;
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
};
diff --git a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
index f363de1..c36e9d7 100644
--- a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
+++ b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
@@ -41,7 +41,7 @@ class JsSyncEncryptionHandlerObserverTest : public testing::Test {
JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_;
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
};
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index c07d909..824dab38 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -40,7 +40,7 @@ class JsSyncManagerObserverTest : public testing::Test {
JsSyncManagerObserver js_sync_manager_observer_;
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
};
diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc
index c770a29..a7f0c1a 100644
--- a/sync/internal_api/public/util/weak_handle_unittest.cc
+++ b/sync/internal_api/public/util/weak_handle_unittest.cc
@@ -53,7 +53,7 @@ class WeakHandleTest : public ::testing::Test {
}
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
static void CallTestFromOtherThread(tracked_objects::Location from_here,
diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
index eb7ff65..65fc964 100644
--- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc
+++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
@@ -111,7 +111,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
}
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
// Getters for tests.
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc
index 61b4672..e323130f 100644
--- a/sync/internal_api/sync_manager_impl_unittest.cc
+++ b/sync/internal_api/sync_manager_impl_unittest.cc
@@ -854,7 +854,7 @@ class SyncManagerTest : public testing::Test,
}
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
void SendJsMessage(const std::string& name, const JsArgList& args,
diff --git a/sync/js/sync_js_controller_unittest.cc b/sync/js/sync_js_controller_unittest.cc
index 4a691d9..ad7973e 100644
--- a/sync/js/sync_js_controller_unittest.cc
+++ b/sync/js/sync_js_controller_unittest.cc
@@ -23,7 +23,7 @@ using ::testing::StrictMock;
class SyncJsControllerTest : public testing::Test {
protected:
void PumpLoop() {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
private:
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);
}