| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DESKTOP_NOTIFICATIONS_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "chrome/browser/notifications/balloon_collection_impl.h" | 12 #include "chrome/browser/notifications/balloon_collection_impl.h" |
| 13 #include "chrome/browser/notifications/desktop_notification_service.h" | 13 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 14 #include "chrome/browser/notifications/notification.h" | 14 #include "chrome/browser/notifications/notification.h" |
| 15 #include "chrome/browser/notifications/notification_test_util.h" | 15 #include "chrome/browser/notifications/notification_test_util.h" |
| 16 #include "chrome/browser/notifications/notification_ui_manager.h" | 16 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 17 #include "chrome/browser/notifications/notifications_prefs_cache.h" | 17 #include "chrome/browser/notifications/notifications_prefs_cache.h" |
| 18 #include "chrome/test/testing_profile.h" | 18 #include "chrome/test/testing_profile.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" | |
| 21 | 20 |
| 22 class DesktopNotificationsTest; | 21 class DesktopNotificationsTest; |
| 23 typedef LoggingNotificationProxyBase<DesktopNotificationsTest> | 22 typedef LoggingNotificationProxyBase<DesktopNotificationsTest> |
| 24 LoggingNotificationProxy; | 23 LoggingNotificationProxy; |
| 25 | 24 |
| 26 // Test version of the balloon collection which counts the number | 25 // Test version of the balloon collection which counts the number |
| 27 // of notifications that are added to it. | 26 // of notifications that are added to it. |
| 28 class MockBalloonCollection : public BalloonCollectionImpl { | 27 class MockBalloonCollection : public BalloonCollectionImpl { |
| 29 public: | 28 public: |
| 30 MockBalloonCollection() : | 29 MockBalloonCollection() : |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 scoped_ptr<NotificationUIManager> ui_manager_; | 106 scoped_ptr<NotificationUIManager> ui_manager_; |
| 108 | 107 |
| 109 // Real DesktopNotificationService | 108 // Real DesktopNotificationService |
| 110 scoped_ptr<DesktopNotificationService> service_; | 109 scoped_ptr<DesktopNotificationService> service_; |
| 111 | 110 |
| 112 // Contains the cumulative output of the unit test. | 111 // Contains the cumulative output of the unit test. |
| 113 static std::string log_output_; | 112 static std::string log_output_; |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ | 115 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ |
| OLD | NEW |