summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/desktop_notifications_unittest.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-17 12:37:57 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-17 12:37:57 +0000
commitb8f50cec7ae39a4776b0b424fe5489f84192010a (patch)
treee0ae2436ffb6bbbd124085fb6ac542f38d6651c4 /chrome/browser/notifications/desktop_notifications_unittest.cc
parent63b054d3f3947d1e396821afb348ea0437fd0ec3 (diff)
downloadchromium_src-b8f50cec7ae39a4776b0b424fe5489f84192010a.zip
chromium_src-b8f50cec7ae39a4776b0b424fe5489f84192010a.tar.gz
chromium_src-b8f50cec7ae39a4776b0b424fe5489f84192010a.tar.bz2
chrome/browser: Update calls from RunAllPending() to RunUntilIdle().
RunAllPending() is deprecated and we should switch to RunUntilIdle(). BUG=131220 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/11413050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/desktop_notifications_unittest.cc')
-rw-r--r--chrome/browser/notifications/desktop_notifications_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc
index 63026af..4a96e9f 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -139,7 +139,7 @@ TEST_F(DesktopNotificationsTest, TestShow) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
content::ShowDesktopNotificationHostMsgParams params2;
@@ -150,7 +150,7 @@ TEST_F(DesktopNotificationsTest, TestShow) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params2, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(2, balloon_collection_->count());
EXPECT_EQ("notification displayed\n"
@@ -166,7 +166,7 @@ TEST_F(DesktopNotificationsTest, TestClose) {
// Request a notification; should open a balloon.
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
// Close all the open balloons.
@@ -192,14 +192,14 @@ TEST_F(DesktopNotificationsTest, TestCancel) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, process_id, route_id,
DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
// Cancel the same notification
service_->CancelDesktopNotification(process_id,
route_id,
notification_id);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
// Verify that the balloon collection is now empty.
EXPECT_EQ(0, balloon_collection_->count());
@@ -287,7 +287,7 @@ TEST_F(DesktopNotificationsTest, TestQueueing) {
params, process_id, route_id,
DesktopNotificationService::PageNotification));
}
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
// Build up an expected log of what should be happening.
std::string expected_log;
@@ -309,7 +309,7 @@ TEST_F(DesktopNotificationsTest, TestQueueing) {
id <= kLotsOfToasts - balloon_collection_->max_balloon_count();
++id) {
service_->CancelDesktopNotification(process_id, route_id, id);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
expected_log.append("notification closed by script\n");
expected_log.append("notification displayed\n");
EXPECT_EQ(balloon_collection_->max_balloon_count(),
@@ -321,7 +321,7 @@ TEST_F(DesktopNotificationsTest, TestQueueing) {
for (; id <= kLotsOfToasts; ++id) {
service_->CancelDesktopNotification(process_id, route_id, id);
expected_log.append("notification closed by script\n");
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(expected_log, log_output_);
}
}
@@ -354,7 +354,7 @@ TEST_F(DesktopNotificationsTest, TestUserInputEscaping) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
Balloon* balloon = (*balloon_collection_->balloons().begin());
GURL data_url = balloon->notification().content_url();