Commit 08f229a9 authored by Akihiro Ota's avatar Akihiro Ota Committed by Chromium LUCI CQ

Add speech expectations to panel search menu test.

There was a recent regression in the search the menus behavior where
search results were not being read aloud to the user; however, the issue
no longer reproduces as of 89.0.4342.0. To catch possible regressions in
the future, this change adds speech expectations to the existing search
the menus test.

Bug: 1151102
Change-Id: I201b8b12dfbf2025f42ced93ade5ac4c63c5c1a3
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2565737Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832140}
parent eb95557a
...@@ -144,17 +144,33 @@ TEST_F('ChromeVoxPanelTest', 'FormControlsMenu', function() { ...@@ -144,17 +144,33 @@ TEST_F('ChromeVoxPanelTest', 'FormControlsMenu', function() {
}); });
TEST_F('ChromeVoxPanelTest', 'SearchMenu', function() { TEST_F('ChromeVoxPanelTest', 'SearchMenu', function() {
const mockFeedback = this.createMockFeedback();
this.runWithLoadedTree(this.linksDoc, async function(root) { this.runWithLoadedTree(this.linksDoc, async function(root) {
new PanelCommand(PanelCommandType.OPEN_MENUS).send(); new PanelCommand(PanelCommandType.OPEN_MENUS).send();
await this.waitForMenu('panel_search_menu'); await this.waitForMenu('panel_search_menu');
await mockFeedback
.expectSpeech('Search the menus', /Type to search the menus/)
.call(() => {
this.fireMockQuery('jump')(); this.fireMockQuery('jump')();
this.assertActiveSearchMenuItem('Jump To Details'); this.assertActiveSearchMenuItem('Jump To Details');
})
.expectSpeech(/Jump/, 'Menu item', /[0-9]+ of [0-9]+/)
.call(() => {
this.fireMockEvent('ArrowDown')(); this.fireMockEvent('ArrowDown')();
this.assertActiveSearchMenuItem('Jump To The Bottom Of The Page'); this.assertActiveSearchMenuItem('Jump To The Bottom Of The Page');
})
.expectSpeech(/Jump/, 'Menu item', /[0-9]+ of [0-9]+/)
.call(() => {
this.fireMockEvent('ArrowDown')(); this.fireMockEvent('ArrowDown')();
this.assertActiveSearchMenuItem('Jump To The Top Of The Page'); this.assertActiveSearchMenuItem('Jump To The Top Of The Page');
})
.expectSpeech(/Jump/, 'Menu item', /[0-9]+ of [0-9]+/)
.call(() => {
this.fireMockEvent('ArrowDown')(); this.fireMockEvent('ArrowDown')();
this.assertActiveSearchMenuItem('Jump To Details'); this.assertActiveSearchMenuItem('Jump To Details');
})
.expectSpeech(/Jump/, 'Menu item', /[0-9]+ of [0-9]+/)
.replay();
}); });
}); });
......
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