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

Side by Side Diff: chrome/browser/notifications/notification_platform_bridge_mac.h

Issue 2143613002: Add new tests to the Notification Mac Bridge Base URL: https://chromium.googlesource.com/chromium/src.git@unit_test
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Validates contents of the |response| dictionary as received from the system 45 // Validates contents of the |response| dictionary as received from the system
46 // when a notification gets activated. 46 // when a notification gets activated.
47 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; 47 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT;
48 48
49 private: 49 private:
50 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, 50 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
51 TestDisplayNoButtons); 51 TestDisplayNoButtons);
52 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, 52 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
53 TestDisplayOneButton); 53 TestDisplayOneButton);
54 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, TestClose); 54 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
55 TestDisplayNiceMock);
56 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, TestCloseOneWay);
57 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
58 TestCloseAnotherWay);
55 59
56 // Used directly in tests. 60 // Used directly in tests.
57 NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center, 61 NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center,
58 bool set_delegate); 62 bool set_delegate);
59 63
60 // Cocoa class that receives callbacks from the NSUserNotificationCenter. 64 // Cocoa class that receives callbacks from the NSUserNotificationCenter.
61 base::scoped_nsobject<NotificationCenterDelegate> delegate_; 65 base::scoped_nsobject<NotificationCenterDelegate> delegate_;
62 66
63 // The notification center to use, this can be overriden in tests 67 // The notification center to use, this can be overriden in tests
64 NSUserNotificationCenter* notification_center_; 68 NSUserNotificationCenter* notification_center_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); 70 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac);
67 }; 71 };
68 72
69 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ 73 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698