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

Unified Diff: ui/message_center/views/custom_notification_view_unittest.cc

Issue 2889623002: Apply View::set_preferred_size in some more places. (Closed)
Patch Set: fix SystemMenuButton Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/views/custom_notification_view_unittest.cc
diff --git a/ui/message_center/views/custom_notification_view_unittest.cc b/ui/message_center/views/custom_notification_view_unittest.cc
index 158e010c9dc6edc0567c3b039faa558600423884..91578ef1571a4fef552e140fbf4156d021729420 100644
--- a/ui/message_center/views/custom_notification_view_unittest.cc
+++ b/ui/message_center/views/custom_notification_view_unittest.cc
@@ -34,6 +34,7 @@ class TestCustomView : public views::View {
TestCustomView() {
SetFocusBehavior(FocusBehavior::ALWAYS);
set_background(views::Background::CreateSolidBackground(kBackgroundColor));
+ set_preferred_size(gfx::Size(100, 100));
}
~TestCustomView() override {}
@@ -42,10 +43,7 @@ class TestCustomView : public views::View {
keyboard_event_count_ = 0;
}
- void set_preferred_size(gfx::Size size) { preferred_size_ = size; }
-
// views::View
- gfx::Size GetPreferredSize() const override { return preferred_size_; }
bool OnMousePressed(const ui::MouseEvent& event) override {
++mouse_event_count_;
return true;
@@ -67,7 +65,6 @@ class TestCustomView : public views::View {
private:
int mouse_event_count_ = 0;
int keyboard_event_count_ = 0;
- gfx::Size preferred_size_ = gfx::Size(100, 100);
DISALLOW_COPY_AND_ASSIGN(TestCustomView);
};
« no previous file with comments | « components/constrained_window/constrained_window_views_unittest.cc ('k') | ui/views/controls/button/image_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698