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

Unified Diff: chrome/browser/notifications/desktop_notifications_unittest.h

Issue 23361031: [Mac] Delete old balloon and Notification Center notification implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/notifications/desktop_notifications_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/desktop_notifications_unittest.h
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.h b/chrome/browser/notifications/desktop_notifications_unittest.h
index 935710fea1d8472965f1d528c0e0fde3ef158be4..86d45756584166d6c737ffd8b4ee6514d83dcfe1 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.h
+++ b/chrome/browser/notifications/desktop_notifications_unittest.h
@@ -15,15 +15,23 @@
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_test_util.h"
-#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/render_view_test.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/message_center/message_center_util.h"
+
+#if defined(USE_AURA)
+#include "ui/aura/test/aura_test_helper.h"
+#include "ui/views/test/desktop_test_views_delegate.h"
+#endif
class ActiveDesktopMonitor;
class DesktopNotificationsTest;
typedef LoggingNotificationDelegate<DesktopNotificationsTest>
LoggingNotificationProxy;
+class TestingProfileManager;
+class TestingProfile;
+
+#if !defined(RUN_MESSAGE_CENTER_TESTS)
// Test version of the balloon collection which counts the number
// of notifications that are added to it.
@@ -67,16 +75,16 @@ class MockBalloonCollection : public BalloonCollectionImpl {
std::deque<Balloon*> balloons_;
};
+#endif // !defined(RUN_MESSAGE_CENTER_TESTS)
+
class DesktopNotificationsTest : public testing::Test {
public:
DesktopNotificationsTest();
virtual ~DesktopNotificationsTest();
- static void log(const std::string& message) {
- log_output_.append(message);
- }
+ static void log(const std::string& message);
- Profile* profile() { return profile_.get(); }
+ TestingProfile* profile() { return profile_; }
protected:
// testing::Test overrides
@@ -91,6 +99,8 @@ class DesktopNotificationsTest : public testing::Test {
service_->DenyPermission(origin);
}
+ int GetNotificationCount();
+
// Constructs a notification parameter structure for use in tests.
content::ShowDesktopNotificationHostMsgParams StandardTestNotification();
@@ -99,17 +109,28 @@ class DesktopNotificationsTest : public testing::Test {
base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
+#if defined(USE_AURA)
+ // Used to create the Aura environment for testing.
+ aura::test::AuraTestHelper aura_test_helper_;
+ views::DesktopTestViewsDelegate views_delegate_;
+#endif
+
// Local state mock.
TestingPrefServiceSimple local_state_;
- // Test profile.
- scoped_ptr<TestingProfile> profile_;
+ // Creator of profiles.
+ scoped_ptr<TestingProfileManager> profile_manager_;
+
+ // Default profile created from profile_manager_.
+ TestingProfile* profile_;
+#if !defined(RUN_MESSAGE_CENTER_TESTS)
// Mock balloon collection -- owned by the NotificationUIManager
MockBalloonCollection* balloon_collection_;
+#endif
// Real UI manager.
- scoped_ptr<BalloonNotificationUIManager> ui_manager_;
+ scoped_ptr<NotificationUIManager> ui_manager_;
// Real DesktopNotificationService
scoped_ptr<DesktopNotificationService> service_;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/notifications/desktop_notifications_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698