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

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

Issue 11416145: desktop notification test setup: valid ShellDelegate, create ActiveDesktopMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notifications_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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/test/base/testing_pref_service.h" 17 #include "chrome/test/base/testing_pref_service.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "content/public/test/render_view_test.h" 19 #include "content/public/test/render_view_test.h"
20 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 class ActiveDesktopMonitor;
23 class DesktopNotificationsTest; 24 class DesktopNotificationsTest;
24 typedef LoggingNotificationDelegate<DesktopNotificationsTest> 25 typedef LoggingNotificationDelegate<DesktopNotificationsTest>
25 LoggingNotificationProxy; 26 LoggingNotificationProxy;
26 27
27 // Test version of the balloon collection which counts the number 28 // Test version of the balloon collection which counts the number
28 // of notifications that are added to it. 29 // of notifications that are added to it.
29 class MockBalloonCollection : public BalloonCollectionImpl { 30 class MockBalloonCollection : public BalloonCollectionImpl {
30 public: 31 public:
31 MockBalloonCollection(); 32 MockBalloonCollection();
32 virtual ~MockBalloonCollection(); 33 virtual ~MockBalloonCollection();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 // Mock balloon collection -- owned by the NotificationUIManager 108 // Mock balloon collection -- owned by the NotificationUIManager
108 MockBalloonCollection* balloon_collection_; 109 MockBalloonCollection* balloon_collection_;
109 110
110 // Real UI manager. 111 // Real UI manager.
111 scoped_ptr<NotificationUIManager> ui_manager_; 112 scoped_ptr<NotificationUIManager> ui_manager_;
112 113
113 // Real DesktopNotificationService 114 // Real DesktopNotificationService
114 scoped_ptr<DesktopNotificationService> service_; 115 scoped_ptr<DesktopNotificationService> service_;
115 116
116 #if defined(USE_AURA) 117 #if defined(USE_ASH)
117 content::RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox 118 content::RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox
118 webkit_platform_support_; 119 webkit_platform_support_;
120
121 scoped_ptr<ActiveDesktopMonitor> active_desktop_monitor_;
119 #endif 122 #endif
120 123
121 // Contains the cumulative output of the unit test. 124 // Contains the cumulative output of the unit test.
122 static std::string log_output_; 125 static std::string log_output_;
123 }; 126 };
124 127
125 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_ 128 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATIONS_UNITTEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notifications_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698