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

Side by Side Diff: ui/message_center/views/notification_view_md.h

Issue 2966343002: Port NotificationViewMD unit tests from NotificationViewTest. (Closed)
Patch Set: Rebased. Created 3 years, 5 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
« no previous file with comments | « ui/message_center/BUILD.gn ('k') | ui/message_center/views/notification_view_md.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 UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void UpdateWithNotification(const Notification& notification) override; 57 void UpdateWithNotification(const Notification& notification) override;
58 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 58 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
59 bool IsCloseButtonFocused() const override; 59 bool IsCloseButtonFocused() const override;
60 void RequestFocusOnCloseButton() override; 60 void RequestFocusOnCloseButton() override;
61 void UpdateControlButtonsVisibility() override; 61 void UpdateControlButtonsVisibility() override;
62 62
63 // views::ViewTargeterDelegate: 63 // views::ViewTargeterDelegate:
64 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; 64 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
65 65
66 private: 66 private:
67 FRIEND_TEST_ALL_PREFIXES(NotificationViewMDTest, CreateOrUpdateTest);
68 FRIEND_TEST_ALL_PREFIXES(NotificationViewMDTest, TestIconSizing);
69 FRIEND_TEST_ALL_PREFIXES(NotificationViewMDTest, UpdateButtonsStateTest);
70 FRIEND_TEST_ALL_PREFIXES(NotificationViewMDTest, UpdateButtonCountTest);
71
72 friend class NotificationViewMDTest;
73
67 void CreateOrUpdateViews(const Notification& notification); 74 void CreateOrUpdateViews(const Notification& notification);
68 75
69 void CreateOrUpdateContextTitleView(const Notification& notification); 76 void CreateOrUpdateContextTitleView(const Notification& notification);
70 void CreateOrUpdateTitleView(const Notification& notification); 77 void CreateOrUpdateTitleView(const Notification& notification);
71 void CreateOrUpdateMessageView(const Notification& notification); 78 void CreateOrUpdateMessageView(const Notification& notification);
72 void CreateOrUpdateCompactTitleMessageView(const Notification& notification); 79 void CreateOrUpdateCompactTitleMessageView(const Notification& notification);
73 void CreateOrUpdateProgressBarView(const Notification& notification); 80 void CreateOrUpdateProgressBarView(const Notification& notification);
74 void CreateOrUpdateListItemViews(const Notification& notification); 81 void CreateOrUpdateListItemViews(const Notification& notification);
75 void CreateOrUpdateIconView(const Notification& notification); 82 void CreateOrUpdateIconView(const Notification& notification);
76 void CreateOrUpdateSmallIconView(const Notification& notification); 83 void CreateOrUpdateSmallIconView(const Notification& notification);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 std::vector<ItemView*> item_views_; 118 std::vector<ItemView*> item_views_;
112 views::ProgressBar* progress_bar_view_ = nullptr; 119 views::ProgressBar* progress_bar_view_ = nullptr;
113 CompactTitleMessageView* compact_title_message_view_ = nullptr; 120 CompactTitleMessageView* compact_title_message_view_ = nullptr;
114 121
115 DISALLOW_COPY_AND_ASSIGN(NotificationViewMD); 122 DISALLOW_COPY_AND_ASSIGN(NotificationViewMD);
116 }; 123 };
117 124
118 } // namespace message_center 125 } // namespace message_center
119 126
120 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_ 127 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
OLDNEW
« no previous file with comments | « ui/message_center/BUILD.gn ('k') | ui/message_center/views/notification_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698