| 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 a5d87f41846290234a417daec410378db4d6526f..e26c4b2f8a08d42ffef7f055b2582605c2cd1dce 100644
|
| --- a/ui/message_center/views/custom_notification_view_unittest.cc
|
| +++ b/ui/message_center/views/custom_notification_view_unittest.cc
|
| @@ -66,13 +66,22 @@ class TestCustomView : public views::View {
|
| DISALLOW_COPY_AND_ASSIGN(TestCustomView);
|
| };
|
|
|
| +class TestContentViewDelegate : public CustomNotificationContentViewDelegate {
|
| + public:
|
| + bool IsCloseButtonFocused() const override { return false; }
|
| + void RequestFocusOnCloseButton() override {}
|
| + bool IsPinned() const override { return false; }
|
| +};
|
| +
|
| class TestNotificationDelegate : public NotificationDelegate {
|
| public:
|
| TestNotificationDelegate() {}
|
|
|
| // NotificateDelegate
|
| - std::unique_ptr<views::View> CreateCustomContent() override {
|
| - return base::WrapUnique(new TestCustomView);
|
| + std::unique_ptr<CustomContent> CreateCustomContent() override {
|
| + return base::MakeUnique<CustomContent>(
|
| + base::MakeUnique<TestCustomView>(),
|
| + base::MakeUnique<TestContentViewDelegate>());
|
| }
|
|
|
| private:
|
| @@ -187,9 +196,6 @@ class CustomNotificationViewTest : public views::ViewsTestBase {
|
| widget()->OnKeyEvent(&event);
|
| }
|
|
|
| - views::ImageButton* close_button() {
|
| - return notification_view_->close_button();
|
| - }
|
| TestMessageCenterController* controller() { return &controller_; }
|
| Notification* notification() { return notification_.get(); }
|
| TestCustomView* custom_view() {
|
| @@ -210,15 +216,6 @@ TEST_F(CustomNotificationViewTest, Background) {
|
| EXPECT_EQ(kBackgroundColor, GetBackgroundColor());
|
| }
|
|
|
| -TEST_F(CustomNotificationViewTest, ClickCloseButton) {
|
| - widget()->Show();
|
| -
|
| - gfx::Point cursor_location(1, 1);
|
| - views::View::ConvertPointToWidget(close_button(), &cursor_location);
|
| - PerformClick(cursor_location);
|
| - EXPECT_TRUE(controller()->IsRemoved(notification()->id()));
|
| -}
|
| -
|
| TEST_F(CustomNotificationViewTest, Events) {
|
| widget()->Show();
|
| custom_view()->RequestFocus();
|
|
|