Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6308)

Unified Diff: chrome/browser/notifications/desktop_notifications_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: 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 dbf7e1c5c5a835f7d55262ce8b77fe6f819380cd..dfc9967623dde6847c171ae752c1f20e9a72b409 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -166,7 +166,7 @@ TEST_F(DesktopNotificationsTest, TestShow) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
content::ShowDesktopNotificationHostMsgParams params2;
@@ -177,7 +177,7 @@ TEST_F(DesktopNotificationsTest, TestShow) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params2, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(2, balloon_collection_->count());
EXPECT_EQ("notification displayed\n"
@@ -193,7 +193,7 @@ TEST_F(DesktopNotificationsTest, TestClose) {
// Request a notification; should open a balloon.
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
// Close all the open balloons.
@@ -219,14 +219,14 @@ TEST_F(DesktopNotificationsTest, TestCancel) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, process_id, route_id,
DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
// Cancel the same notification
service_->CancelDesktopNotification(process_id,
route_id,
notification_id);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
// Verify that the balloon collection is now empty.
EXPECT_EQ(0, balloon_collection_->count());
@@ -334,7 +334,7 @@ TEST_F(DesktopNotificationsTest, TestCancelByProfile) {
params, process_id, route_id,
DesktopNotificationService::PageNotification));
}
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
ui_manager_->CancelAllByProfile(second_profile);
@@ -371,7 +371,7 @@ TEST_F(DesktopNotificationsTest, TestCancelBySourceOrigin) {
odd_params, process_id, route_id,
DesktopNotificationService::PageNotification));
}
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
ui_manager_->CancelAllBySourceOrigin(odd_params.origin);
@@ -394,7 +394,7 @@ TEST_F(DesktopNotificationsTest, TestQueueing) {
params, process_id, route_id,
DesktopNotificationService::PageNotification));
}
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
// Build up an expected log of what should be happening.
std::string expected_log;
@@ -416,7 +416,7 @@ TEST_F(DesktopNotificationsTest, TestQueueing) {
id <= kLotsOfToasts - balloon_collection_->max_balloon_count();
++id) {
service_->CancelDesktopNotification(process_id, route_id, id);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
expected_log.append("notification closed by script\n");
expected_log.append("notification displayed\n");
EXPECT_EQ(balloon_collection_->max_balloon_count(),
@@ -428,7 +428,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()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(expected_log, log_output_);
}
}
@@ -461,7 +461,7 @@ TEST_F(DesktopNotificationsTest, TestUserInputEscaping) {
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(1, balloon_collection_->count());
Balloon* balloon = (*balloon_collection_->balloons().begin());
GURL data_url = balloon->notification().content_url();
« no previous file with comments | « chrome/browser/notifications/desktop_notifications_unittest.h ('k') | chrome/browser/omnibox_search_hint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698