OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |