Chromium Code Reviews| 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/15 18:07:50
This'll break on Mac pretty soon.
What about:
Miguel Garcia
2017/03/16 14:57:42
It wont' break (since the stub does not have XPC).
|
| + return count; |
| } |
| Notification GetDisplayedNotification() { |