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

Side by Side Diff: ui/message_center/views/message_list_view_unittest.cc

Issue 2558083005: Remove "top_down" flag in the message center code (Closed)
Patch Set: Created 4 years 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/views/message_list_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 public MessageListView::Observer, 86 public MessageListView::Observer,
87 public MessageCenterController { 87 public MessageCenterController {
88 public: 88 public:
89 MessageListViewTest() {} 89 MessageListViewTest() {}
90 90
91 ~MessageListViewTest() override {} 91 ~MessageListViewTest() override {}
92 92
93 void SetUp() override { 93 void SetUp() override {
94 views::ViewsTestBase::SetUp(); 94 views::ViewsTestBase::SetUp();
95 95
96 message_list_view_.reset(new MessageListView(false /* top_down */)); 96 message_list_view_.reset(new MessageListView());
97 message_list_view_->AddObserver(this); 97 message_list_view_->AddObserver(this);
98 message_list_view_->set_owned_by_client(); 98 message_list_view_->set_owned_by_client();
99 99
100 widget_.reset(new views::Widget()); 100 widget_.reset(new views::Widget());
101 views::Widget::InitParams params = 101 views::Widget::InitParams params =
102 CreateParams(views::Widget::InitParams::TYPE_POPUP); 102 CreateParams(views::Widget::InitParams::TYPE_POPUP);
103 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 103 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
104 params.bounds = gfx::Rect(50, 50, 650, 650); 104 params.bounds = gfx::Rect(50, 50, 650, 650);
105 widget_->Init(params); 105 widget_->Init(params);
106 views::View* root = widget_->GetRootView(); 106 views::View* root = widget_->GetRootView();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 EXPECT_FALSE(message_list_view()->Contains(notification_view)); 176 EXPECT_FALSE(message_list_view()->Contains(notification_view));
177 177
178 // Add a notification. 178 // Add a notification.
179 message_list_view()->AddNotificationAt(notification_view, 0); 179 message_list_view()->AddNotificationAt(notification_view, 0);
180 180
181 EXPECT_EQ(1, message_list_view()->child_count()); 181 EXPECT_EQ(1, message_list_view()->child_count());
182 EXPECT_TRUE(message_list_view()->Contains(notification_view)); 182 EXPECT_TRUE(message_list_view()->Contains(notification_view));
183 } 183 }
184 184
185 } // namespace 185 } // namespace
OLDNEW
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698