Commit 30cee4f4 authored by Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez Committed by Commit Bot

Test accessibility alert event on infobars.

Bug: 1082217
Change-Id: I97159b1cb3b6ccf8c57f17f54d011447fa6db681
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432027Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Cr-Commit-Position: refs/heads/master@{#811133}
parent 51b79729
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/ui/views/infobars/infobar_container_view.h" #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
#include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/browser_with_test_window_test.h"
#include "ui/views/test/ax_event_counter.h"
class TestInfoBarDelegate : public infobars::InfoBarDelegate { class TestInfoBarDelegate : public infobars::InfoBarDelegate {
public: public:
...@@ -76,3 +77,10 @@ TEST_F(InfoBarViewTest, LayoutOnHiddenInfoBar) { ...@@ -76,3 +77,10 @@ TEST_F(InfoBarViewTest, LayoutOnHiddenInfoBar) {
DetachContainer(); DetachContainer();
infobar->Layout(); infobar->Layout();
} }
TEST_F(InfoBarViewTest, AlertAccessibleEvent) {
views::test::AXEventCounter counter(views::AXEventManager::Get());
EXPECT_EQ(0, counter.GetCount(ax::mojom::Event::kAlert));
TestInfoBarDelegate::Create(infobar_service());
EXPECT_EQ(1, counter.GetCount(ax::mojom::Event::kAlert));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment