From b8f50cec7ae39a4776b0b424fe5489f84192010a Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sat, 17 Nov 2012 12:37:57 +0000 Subject: 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 --- .../notifications/desktop_notifications_unittest.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'chrome/browser/notifications/desktop_notifications_unittest.cc') 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(); -- cgit v1.1