| 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_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "chrome/browser/browser_list.h" | 13 #include "chrome/browser/browser_list.h" |
| 14 #include "chrome/browser/chrome_thread.h" | 14 #include "chrome/browser/chrome_thread.h" |
| 15 #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" | 15 #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" |
| 16 #include "chrome/browser/notifications/balloon.h" | 16 #include "chrome/browser/notifications/balloon.h" |
| 17 #include "chrome/browser/notifications/desktop_notification_service.h" | 17 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 18 #include "chrome/browser/notifications/notification.h" | 18 #include "chrome/browser/notifications/notification.h" |
| 19 #include "chrome/browser/notifications/notification_object_proxy.h" | 19 #include "chrome/browser/notifications/notification_object_proxy.h" |
| 20 #include "chrome/browser/notifications/notification_test_util.h" | 20 #include "chrome/browser/notifications/notification_test_util.h" |
| 21 #include "chrome/browser/notifications/notification_ui_manager.h" | 21 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 22 #include "chrome/browser/notifications/notifications_prefs_cache.h" | 22 #include "chrome/browser/notifications/notifications_prefs_cache.h" |
| 23 #include "chrome/test/testing_profile.h" | 23 #include "chrome/test/testing_profile.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" | |
| 26 | 25 |
| 27 namespace chromeos { | 26 namespace chromeos { |
| 28 | 27 |
| 29 class DesktopNotificationsTest; | 28 class DesktopNotificationsTest; |
| 30 typedef LoggingNotificationProxyBase<DesktopNotificationsTest> | 29 typedef LoggingNotificationProxyBase<DesktopNotificationsTest> |
| 31 LoggingNotificationProxy; | 30 LoggingNotificationProxy; |
| 32 | 31 |
| 33 // Test version of the balloon collection which counts the number | 32 // Test version of the balloon collection which counts the number |
| 34 // of notifications that are added to it. | 33 // of notifications that are added to it. |
| 35 class MockBalloonCollection : public BalloonCollectionImpl { | 34 class MockBalloonCollection : public BalloonCollectionImpl { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Real DesktopNotificationService | 100 // Real DesktopNotificationService |
| 102 scoped_ptr<DesktopNotificationService> service_; | 101 scoped_ptr<DesktopNotificationService> service_; |
| 103 | 102 |
| 104 // Contains the cumulative output of the unit test. | 103 // Contains the cumulative output of the unit test. |
| 105 static std::string log_output_; | 104 static std::string log_output_; |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace chromeos | 107 } // namespace chromeos |
| 109 | 108 |
| 110 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_
H_ | 109 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_
H_ |
| OLD | NEW |