Index: chrome/browser/notifications/platform_notification_service_unittest.cc |
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc |
index f26cae46a79145e3165d0a2cefcc3cb3afb25ba0..a5c3296e0d8dcfdc04dc20e855923cdbba502452 100644 |
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc |
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc |
@@ -143,9 +143,19 @@ class PlatformNotificationServiceTest : public testing::Test { |
Profile* profile() const { return profile_; } |
size_t GetNotificationCount() const { |
- std::set<std::string> notifications; |
- EXPECT_TRUE(display_service()->GetDisplayed(¬ifications)); |
- return notifications.size(); |
+ size_t count = 0; |
+#if defined(OS_ANDROID) |
+ count = static_cast<StubNotificationPlatformBridge*>( |
+ g_browser_process->notification_platform_bridge()) |
+ ->GetNotificationCount(); |
+#else |
+ count = |
+ static_cast<StubNotificationUIManager*>( |
+ g_browser_process->notification_ui_manager()) |
+ ->GetAllIdsByProfile(NotificationUIManager::GetProfileID(profile_)) |
+ .size(); |
+#endif |
Peter Beverloo
2017/03/17 15:46:04
Even if it won't break on Mac, my proposed code he
Miguel Garcia
2017/03/20 14:11:21
Discussed offline and agreed to change it to this
|
+ return count; |
} |
Notification GetDisplayedNotification() { |