OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/notifications/notification.h" | 11 #include "chrome/browser/notifications/notification.h" |
12 #include "chrome/browser/notifications/notification_object_proxy.h" | 12 #include "chrome/browser/notifications/notification_object_proxy.h" |
13 #include "chrome/browser/notifications/notification_ui_manager.h" | 13 #include "chrome/browser/notifications/notification_ui_manager.h" |
14 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 14 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 | 17 |
18 // NotificationDelegate which does nothing, useful for testing when | 18 // NotificationDelegate which does nothing, useful for testing when |
19 // the notification events are not important. | 19 // the notification events are not important. |
20 class MockNotificationDelegate : public NotificationDelegate { | 20 class MockNotificationDelegate : public NotificationDelegate { |
21 public: | 21 public: |
22 explicit MockNotificationDelegate(const std::string& id); | 22 explicit MockNotificationDelegate(const std::string& id); |
23 | 23 |
24 // NotificationDelegate interface. | 24 // NotificationDelegate interface. |
25 void Display() override {} | |
26 void Error() override {} | |
27 void Close(bool by_user) override {} | |
28 void Click() override {} | |
29 std::string id() const override; | 25 std::string id() const override; |
30 | 26 |
31 private: | 27 private: |
32 ~MockNotificationDelegate() override; | 28 ~MockNotificationDelegate() override; |
33 | 29 |
34 std::string id_; | 30 std::string id_; |
35 | 31 |
36 DISALLOW_COPY_AND_ASSIGN(MockNotificationDelegate); | 32 DISALLOW_COPY_AND_ASSIGN(MockNotificationDelegate); |
37 }; | 33 }; |
38 | 34 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); | 121 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); |
126 Notification notification_; | 122 Notification notification_; |
127 Profile* profile_; | 123 Profile* profile_; |
128 std::string dismissed_id_; | 124 std::string dismissed_id_; |
129 GURL welcome_origin_; | 125 GURL welcome_origin_; |
130 bool welcomed_; | 126 bool welcomed_; |
131 size_t added_notifications_; | 127 size_t added_notifications_; |
132 }; | 128 }; |
133 | 129 |
134 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 130 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
OLD | NEW |