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

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

Issue 2458703003: Create a stub NSUserNotificationCenter and make tests use it. (Closed)
Patch Set: review Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_
7
8 #import <AppKit/AppKit.h>
9
10 @class NSUserNotificationCenterDelegate;
11
12 // Stubs NSUserNotificationCenter so it can be used in tests without actually
13 // displaying notifications.
14 // Unlike the real class this is not a singleton and the lifecycle needs to be
15 // handled by the caller.
16 // See notification_platform_bridge_mac_unittest.mm for an example.
17 @interface StubNotificationCenter : NSUserNotificationCenter
18 - (instancetype)init;
19 - (void)setDelegate:(NSUserNotificationCenterDelegate*)delegate;
20
21 @end
22
23 #endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698