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

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

Issue 2338733002: Use TestSimpleTaskRunner::HasPendingTask instead of GetPendingTasks().empty() (Closed)
Patch Set: +bluetooth_adapter_win_unittest.cc Created 4 years, 3 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/extension_welcome_notification_unittest.cc
diff --git a/chrome/browser/notifications/extension_welcome_notification_unittest.cc b/chrome/browser/notifications/extension_welcome_notification_unittest.cc
index 44a5c8bcf74f00713350d61100847bb87fb0e2e0..cae9ba2530091bd0a534899b3951eba551ae2b40 100644
--- a/chrome/browser/notifications/extension_welcome_notification_unittest.cc
+++ b/chrome/browser/notifications/extension_welcome_notification_unittest.cc
@@ -474,7 +474,7 @@ TEST_F(ExtensionWelcomeNotificationTest, TimeExpiredNotification) {
EXPECT_FALSE(GetBooleanPref(prefs::kWelcomeNotificationDismissedLocal));
EXPECT_FALSE(GetBooleanPref(prefs::kWelcomeNotificationPreviouslyPoppedUp));
EXPECT_EQ(GetInt64Pref(prefs::kWelcomeNotificationExpirationTimestamp), 0);
- EXPECT_TRUE(task_runner()->GetPendingTasks().empty());
+ EXPECT_FALSE(task_runner()->HasPendingTask());
ShowChromeNowNotification();
@@ -498,7 +498,7 @@ TEST_F(ExtensionWelcomeNotificationTest, TimeExpiredNotification) {
SetElapsedTime(requested_show_time);
task_runner()->RunPendingTasks();
- EXPECT_TRUE(task_runner()->GetPendingTasks().empty());
+ EXPECT_FALSE(task_runner()->HasPendingTask());
EXPECT_EQ(message_center()->add_notification_calls(), 1);
EXPECT_EQ(message_center()->remove_notification_calls(), 1);
EXPECT_EQ(message_center()->notifications_with_shown_as_popup(), 0);
@@ -520,7 +520,7 @@ TEST_F(ExtensionWelcomeNotificationTest, NotificationPreviouslyExpired) {
EXPECT_FALSE(GetBooleanPref(prefs::kWelcomeNotificationDismissedLocal));
EXPECT_TRUE(GetBooleanPref(prefs::kWelcomeNotificationPreviouslyPoppedUp));
EXPECT_EQ(GetInt64Pref(prefs::kWelcomeNotificationExpirationTimestamp), 1);
- EXPECT_TRUE(task_runner()->GetPendingTasks().empty());
+ EXPECT_FALSE(task_runner()->HasPendingTask());
const base::TimeDelta requested_show_time =
base::TimeDelta::FromDays(
@@ -528,7 +528,7 @@ TEST_F(ExtensionWelcomeNotificationTest, NotificationPreviouslyExpired) {
SetElapsedTime(requested_show_time);
ShowChromeNowNotification();
- EXPECT_TRUE(task_runner()->GetPendingTasks().empty());
+ EXPECT_FALSE(task_runner()->HasPendingTask());
EXPECT_EQ(message_center()->add_notification_calls(), 0);
EXPECT_EQ(message_center()->remove_notification_calls(), 0);
EXPECT_EQ(message_center()->notifications_with_shown_as_popup(), 0);

Powered by Google App Engine
This is Rietveld 408576698