| Index: chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
|
| diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
|
| index 509729a5db138ef14d2fbe42e534c1cde44bfd7f..05d30e51886a6c91367bbdfc88a1c10f8a74948e 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
|
| @@ -5,6 +5,7 @@
|
| #import <AppKit/AppKit.h>
|
|
|
| #include "base/mac/scoped_nsobject.h"
|
| +#include "chrome/browser/notifications/notification_common.h"
|
| #include "chrome/browser/notifications/notification_platform_bridge_mac.h"
|
| #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h"
|
| #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h"
|
| @@ -26,6 +27,9 @@ NSMutableDictionary* BuildDefaultNotificationResponse() {
|
| [builder setNotificationId:@"notificationId"];
|
| [builder setProfileId:@"profileId"];
|
| [builder setIncognito:false];
|
| + [builder
|
| + setNotificationType:[NSNumber
|
| + numberWithInt:NotificationCommon::PERSISTENT]];
|
|
|
| NSUserNotification* notification = [builder buildUserNotification];
|
| return [NSMutableDictionary
|
| @@ -40,6 +44,13 @@ TEST(NotificationPlatformBridgeMacTest, TestNotificationValidResponse) {
|
| EXPECT_TRUE(NotificationPlatformBridgeMac::VerifyNotificationData(response));
|
| }
|
|
|
| +TEST(NotificationPlatformBridgeMacTest, TestNotificationUnknownType) {
|
| + NSMutableDictionary* response = BuildDefaultNotificationResponse();
|
| + [response setValue:[NSNumber numberWithInt:210581]
|
| + forKey:notification_constants::kNotificationType];
|
| + EXPECT_FALSE(NotificationPlatformBridgeMac::VerifyNotificationData(response));
|
| +}
|
| +
|
| TEST(NotificationPlatformBridgeMacTest, TestNotificationUnknownOperation) {
|
| NSMutableDictionary* response = BuildDefaultNotificationResponse();
|
| [response setValue:[NSNumber numberWithInt:40782]
|
|
|