#include "ui/message_center/views/message_view.h"
#include <memory>
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/test/event_generator.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/public/cpp/notification.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_utils.h"
namespace message_center {
class NotificationControlButtonsView;
class TestMessageView : public MessageView { … };
class MessageViewTest : public views::ViewsTestBase { … };
#if BUILDFLAG(IS_CHROMEOS_ASH)
TEST_F(MessageViewTest, UpdateControlButtonsVisibilityCalled) {
ui::test::EventGenerator event_generator(
GetRootWindow(message_view()->GetWidget()));
EXPECT_CALL(*message_view(), UpdateControlButtonsVisibility);
event_generator.MoveMouseTo(message_view()->GetBoundsInScreen().CenterPoint(),
10);
EXPECT_CALL(*message_view(), UpdateControlButtonsVisibility);
event_generator.MoveMouseTo(
message_view()->GetBoundsInScreen().origin() - gfx::Vector2d(10, 10), 10);
}
#endif
TEST_F(MessageViewTest, AccessibleAttributes) { … }
}