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

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

Issue 2868793002: Delete MessageViews cleared by "Clear All" after animation. (Closed)
Patch Set: 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
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_list_view_unittest.cc
diff --git a/ui/message_center/views/message_list_view_unittest.cc b/ui/message_center/views/message_list_view_unittest.cc
index 8d139a8d51ec4ef7a9ba908a1d56aae9dccb7076..48f54d69aa15d8e6256239f63c2c32b940ce105f 100644
--- a/ui/message_center/views/message_list_view_unittest.cc
+++ b/ui/message_center/views/message_list_view_unittest.cc
@@ -59,7 +59,11 @@ class MockNotificationView : public NotificationView {
MockNotificationView::MockNotificationView(MessageCenterController* controller,
const Notification& notification,
Test* test)
- : NotificationView(controller, notification), test_(test) {}
+ : NotificationView(controller, notification), test_(test) {
+ // Calling SetPaintToLayer() to ensure that this view has its own layer.
+ // This layer is needed to enable adding/removal animations.
+ SetPaintToLayer();
+}
MockNotificationView::~MockNotificationView() {}
@@ -441,15 +445,7 @@ TEST_F(MessageListViewTest, ClearAllClosableNotifications) {
RunPendingAnimations();
- // TODO(yhanada): notification_view1 and notification_view2 should be deleted
- // here. Uncomment the below test.
- EXPECT_TRUE(gfx::IntersectRects(notification_view1->bounds(),
- message_list_view()->bounds())
- .IsEmpty());
- EXPECT_TRUE(gfx::IntersectRects(notification_view2->bounds(),
- message_list_view()->bounds())
- .IsEmpty());
- // EXPECT_EQ(0, message_list_view()->child_count());
+ EXPECT_EQ(0, message_list_view()->child_count());
}
} // namespace
« 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