summaryrefslogtreecommitdiffstats
path: root/jingle/notifier
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 16:50:27 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 16:50:27 +0000
commit8414dfb6314744fd5f0ddfaddf86f8373e403af8 (patch)
treeff346a0b8007d7bca8758c505dbb3ff8ab3fbc25 /jingle/notifier
parent09fd86eb7e1f05843679afa2e9715c102c7bb3ad (diff)
downloadchromium_src-8414dfb6314744fd5f0ddfaddf86f8373e403af8.zip
chromium_src-8414dfb6314744fd5f0ddfaddf86f8373e403af8.tar.gz
chromium_src-8414dfb6314744fd5f0ddfaddf86f8373e403af8.tar.bz2
jingle: Update the calls from RunAllPending() to RunUntilIdle().
RunAllPending() is deprecated and we should switch to RunUntilIdle(). BUG=131220 TBR=ajwong@chromium.org Review URL: https://chromiumcodereview.appspot.com/11421172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/notifier')
-rw-r--r--jingle/notifier/base/xmpp_connection_unittest.cc10
-rw-r--r--jingle/notifier/communicator/single_login_attempt_unittest.cc2
-rw-r--r--jingle/notifier/listener/non_blocking_push_client_unittest.cc20
-rw-r--r--jingle/notifier/listener/xmpp_push_client_unittest.cc2
4 files changed, 17 insertions, 17 deletions
diff --git a/jingle/notifier/base/xmpp_connection_unittest.cc b/jingle/notifier/base/xmpp_connection_unittest.cc
index c6f9c81..a230d29 100644
--- a/jingle/notifier/base/xmpp_connection_unittest.cc
+++ b/jingle/notifier/base/xmpp_connection_unittest.cc
@@ -82,7 +82,7 @@ class XmppConnectionTest : public testing::Test {
virtual void TearDown() {
// Clear out any messages posted by XmppConnection's destructor.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
// Needed by XmppConnection.
@@ -112,7 +112,7 @@ TEST_F(XmppConnectionTest, ImmediateFailure) {
// We need to do this *before* |xmpp_connection| gets destroyed or
// our delegate won't be called.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
TEST_F(XmppConnectionTest, PreAuthFailure) {
@@ -131,7 +131,7 @@ TEST_F(XmppConnectionTest, PreAuthFailure) {
// We need to do this *before* |xmpp_connection| gets destroyed or
// our delegate won't be called.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
TEST_F(XmppConnectionTest, FailureAfterPreAuth) {
@@ -150,7 +150,7 @@ TEST_F(XmppConnectionTest, FailureAfterPreAuth) {
// We need to do this *before* |xmpp_connection| gets destroyed or
// our delegate won't be called.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
TEST_F(XmppConnectionTest, RaisedError) {
@@ -247,7 +247,7 @@ TEST_F(XmppConnectionTest, TasksDontRunAfterXmppConnectionDestructor) {
}
// This should destroy |task_pump|, but |task| still shouldn't run.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
} // namespace notifier
diff --git a/jingle/notifier/communicator/single_login_attempt_unittest.cc b/jingle/notifier/communicator/single_login_attempt_unittest.cc
index bc6f2df..d32fad5 100644
--- a/jingle/notifier/communicator/single_login_attempt_unittest.cc
+++ b/jingle/notifier/communicator/single_login_attempt_unittest.cc
@@ -98,7 +98,7 @@ class SingleLoginAttemptTest : public ::testing::Test {
attempt_(login_settings_, &fake_delegate_) {}
virtual void TearDown() OVERRIDE {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
void FireRedirect(buzz::XmlElement* redirect_error) {
diff --git a/jingle/notifier/listener/non_blocking_push_client_unittest.cc b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
index 8908910..fea26fe 100644
--- a/jingle/notifier/listener/non_blocking_push_client_unittest.cc
+++ b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
@@ -34,17 +34,17 @@ class NonBlockingPushClientTest : public testing::Test {
base::Unretained(this))));
push_client_->AddObserver(&fake_observer_);
// Pump message loop to run CreateFakePushClient.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
virtual void TearDown() OVERRIDE {
// Clear out any pending notifications before removing observers.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
push_client_->RemoveObserver(&fake_observer_);
push_client_.reset();
// Then pump message loop to run
// NonBlockingPushClient::DestroyOnDelegateThread().
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
scoped_ptr<PushClient> CreateFakePushClient() {
@@ -71,7 +71,7 @@ TEST_F(NonBlockingPushClientTest, UpdateSubscriptions) {
push_client_->UpdateSubscriptions(subscriptions);
EXPECT_TRUE(fake_push_client_->subscriptions().empty());
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_TRUE(
SubscriptionListsEqual(
fake_push_client_->subscriptions(), subscriptions));
@@ -85,7 +85,7 @@ TEST_F(NonBlockingPushClientTest, UpdateCredentials) {
push_client_->UpdateCredentials(kEmail, kToken);
EXPECT_TRUE(fake_push_client_->email().empty());
EXPECT_TRUE(fake_push_client_->token().empty());
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_EQ(kEmail, fake_push_client_->email());
EXPECT_EQ(kToken, fake_push_client_->token());
}
@@ -106,7 +106,7 @@ TEST_F(NonBlockingPushClientTest, SendNotification) {
push_client_->SendNotification(notification);
EXPECT_TRUE(fake_push_client_->sent_notifications().empty());
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
ASSERT_EQ(1u, fake_push_client_->sent_notifications().size());
EXPECT_TRUE(
fake_push_client_->sent_notifications()[0].Equals(notification));
@@ -116,7 +116,7 @@ TEST_F(NonBlockingPushClientTest, SendNotification) {
TEST_F(NonBlockingPushClientTest, SendPing) {
push_client_->SendPing();
EXPECT_EQ(0, fake_push_client_->sent_pings());
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
ASSERT_EQ(1, fake_push_client_->sent_pings());
}
@@ -126,12 +126,12 @@ TEST_F(NonBlockingPushClientTest, NotificationStateChange) {
EXPECT_EQ(DEFAULT_NOTIFICATION_ERROR,
fake_observer_.last_notifications_disabled_reason());
fake_push_client_->EnableNotifications();
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_EQ(NO_NOTIFICATION_ERROR,
fake_observer_.last_notifications_disabled_reason());
fake_push_client_->DisableNotifications(
NOTIFICATION_CREDENTIALS_REJECTED);
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_EQ(NOTIFICATION_CREDENTIALS_REJECTED,
fake_observer_.last_notifications_disabled_reason());
}
@@ -141,7 +141,7 @@ TEST_F(NonBlockingPushClientTest, OnIncomingNotification) {
const Notification notification = MakeTestNotification();
fake_push_client_->SimulateIncomingNotification(notification);
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_TRUE(
fake_observer_.last_incoming_notification().Equals(notification));
}
diff --git a/jingle/notifier/listener/xmpp_push_client_unittest.cc b/jingle/notifier/listener/xmpp_push_client_unittest.cc
index c4d53de..8d4c669 100644
--- a/jingle/notifier/listener/xmpp_push_client_unittest.cc
+++ b/jingle/notifier/listener/xmpp_push_client_unittest.cc
@@ -47,7 +47,7 @@ class XmppPushClientTest : public testing::Test {
virtual void TearDown() OVERRIDE {
// Clear out any messages posted by XmppPushClient.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
xmpp_push_client_->RemoveObserver(&mock_observer_);
xmpp_push_client_.reset();
}