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 d0a79e47271504f30fa8018d717f7b293ee50c3f..808fdd2931306d60a08898fe47df4a72ed4925bf 100644 |
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc |
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc |
@@ -65,19 +65,23 @@ |
class MockDesktopNotificationDelegate |
: public content::DesktopNotificationDelegate { |
public: |
- MockDesktopNotificationDelegate() : displayed_(false) {} |
+ MockDesktopNotificationDelegate() |
+ : displayed_(false), |
+ clicked_(false) {} |
~MockDesktopNotificationDelegate() override {} |
// content::DesktopNotificationDelegate implementation. |
void NotificationDisplayed() override { displayed_ = true; } |
void NotificationClosed() override {} |
- void NotificationClick() override {} |
+ void NotificationClick() override { clicked_ = true; } |
bool displayed() const { return displayed_; } |
+ bool clicked() const { return clicked_; } |
private: |
bool displayed_; |
+ bool clicked_; |
DISALLOW_COPY_AND_ASSIGN(MockDesktopNotificationDelegate); |
}; |
@@ -189,15 +193,12 @@ |
std::unique_ptr<std::set<std::string>> displayed_notifications_; |
}; |
-// Native, non persistent notifications don't have delegates any more |
-#if !defined(OS_MACOSX) |
TEST_F(PlatformNotificationServiceTest, DisplayPageDisplayedEvent) { |
auto* delegate = CreateSimplePageNotification(); |
EXPECT_EQ(1u, GetNotificationCount()); |
EXPECT_TRUE(delegate->displayed()); |
} |
-#endif // !defined(OS_MACOSX) |
TEST_F(PlatformNotificationServiceTest, DisplayPageCloseClosure) { |
base::Closure close_closure; |