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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the ever-changing Mac unit tests. Created 7 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" 5 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 25 matching lines...) Expand all
36 class WebNotificationTrayWinTest : public InProcessBrowserTest { 36 class WebNotificationTrayWinTest : public InProcessBrowserTest {
37 public: 37 public:
38 WebNotificationTrayWinTest() {} 38 WebNotificationTrayWinTest() {}
39 virtual ~WebNotificationTrayWinTest() {} 39 virtual ~WebNotificationTrayWinTest() {}
40 40
41 virtual void CleanUpOnMainThread() OVERRIDE { 41 virtual void CleanUpOnMainThread() OVERRIDE {
42 message_center::MessageCenter::Get()->RemoveAllNotifications(false); 42 message_center::MessageCenter::Get()->RemoveAllNotifications(false);
43 } 43 }
44 44
45 protected: 45 protected:
46 class TestNotificationDelegate : public NotificationDelegate { 46 class TestNotificationDelegate : public ::NotificationDelegate {
47 public: 47 public:
48 explicit TestNotificationDelegate(std::string id) : id_(id) {} 48 explicit TestNotificationDelegate(std::string id) : id_(id) {}
49 virtual void Display() {} 49 virtual void Display() {}
50 virtual void Error() {} 50 virtual void Error() {}
51 virtual void Close(bool by_user) {} 51 virtual void Close(bool by_user) {}
52 virtual void Click() {} 52 virtual void Click() {}
53 virtual std::string id() const { return id_; } 53 virtual std::string id() const { return id_; }
54 virtual content::RenderViewHost* GetRenderViewHost() const { return NULL; } 54 virtual content::RenderViewHost* GetRenderViewHost() const { return NULL; }
55 private: 55 private:
56 std::string id_; 56 std::string id_;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 tray->message_center_tray_->ShowPopupBubble(); 196 tray->message_center_tray_->ShowPopupBubble();
197 EXPECT_TRUE(tray->message_center_tray_->popups_visible()); 197 EXPECT_TRUE(tray->message_center_tray_->popups_visible());
198 EXPECT_EQ(notifications_to_add, 198 EXPECT_EQ(notifications_to_add,
199 message_center->NotificationCount()); 199 message_center->NotificationCount());
200 NotificationList::PopupNotifications popups = 200 NotificationList::PopupNotifications popups =
201 message_center->GetPopupNotifications(); 201 message_center->GetPopupNotifications();
202 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size()); 202 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size());
203 } 203 }
204 204
205 } // namespace message_center 205 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_delegate.cc ('k') | ui/message_center/cocoa/notification_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698