Commit 2132f7fe authored by Katie Dektar's avatar Katie Dektar Committed by Chromium LUCI CQ

Disable flaky chromevox test in msan builds.

Bug: 1169396
Change-Id: Iee21b83a251e8e724327d8cc816194ee71807f7b
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643190
Auto-Submit: Katie Dektar <katie@chromium.org>
Reviewed-by: default avatarNina Satragno <nsatragno@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846325}
parent c9ad64b4
......@@ -150,77 +150,87 @@ TEST_F('ChromeVoxOptionsTest', 'SmartStickyMode', function() {
.replay();
});
});
TEST_F('ChromeVoxOptionsTest', 'UsePitchChanges', function() {
this.runOnOptionsPage((mockFeedback, evt) => {
const pitchChangesCheckbox = evt.target.find({
role: chrome.automation.RoleType.CHECK_BOX,
attributes: {
name: 'Change pitch when speaking element types and quoted, deleted, ' +
'bolded, parenthesized, or capitalized text.'
}
});
const capitalStrategySelect = evt.target.find({
role: chrome.automation.RoleType.POP_UP_BUTTON,
attributes: {name: 'When reading capitals:'}
// TODO(crbug.com/1169396): Test times out or crashes flakily in MSAN builds.
TEST_F_WITH_PREAMBLE(
`
#if defined(MEMORY_SANITIZER)
#define MAYBE_UsePitchChanges DISABLED_UsePitchChanges
#else
#define MAYBE_UsePitchChanges UsePitchChanges
#endif
`,
'ChromeVoxOptionsTest', 'MAYBE_UsePitchChanges', function() {
this.runOnOptionsPage((mockFeedback, evt) => {
const pitchChangesCheckbox = evt.target.find({
role: chrome.automation.RoleType.CHECK_BOX,
attributes: {
name: 'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.'
}
});
const capitalStrategySelect = evt.target.find({
role: chrome.automation.RoleType.POP_UP_BUTTON,
attributes: {name: 'When reading capitals:'}
});
assertNotNullNorUndefined(pitchChangesCheckbox);
assertNotNullNorUndefined(capitalStrategySelect);
// Assert initial pref values.
assertEquals('true', localStorage['usePitchChanges']);
assertEquals('increasePitch', localStorage['capitalStrategy']);
mockFeedback.call(pitchChangesCheckbox.focus.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Checked')
.call(pitchChangesCheckbox.doDefault.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Not checked')
.call(() => {
assertEquals('false', localStorage['usePitchChanges']);
// Toggling usePitchChanges affects capitalStrategy. Ensure that
// the preference has been changed and that the 'Increase pitch'
// option is hidden.
assertEquals('announceCapitals', localStorage['capitalStrategy']);
// Open the menu first in order to assert this.
// const increasePitchOption = evt.target.find({
// role: chrome.automation.RoleType.MENU_LIST_OPTION,
// attributes: {name: 'Increase pitch'}
//});
// assertNotNullNorUndefined(increasePitchOption);
// assertTrue(increasePitchOption.state.invisible);
})
.call(capitalStrategySelect.focus.bind(capitalStrategySelect))
.expectSpeech(
'When reading capitals:', 'Speak "cap" before letter',
'Collapsed')
.call(pitchChangesCheckbox.doDefault.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Checked')
.call(() => {
assertEquals('true', localStorage['usePitchChanges']);
// Ensure that the capitalStrategy preference is restored to its
// initial setting and that the 'Increase pitch' option is visible
// again.
assertEquals('increasePitch', localStorage['capitalStrategy']);
// Open the menu first in order to assert this.
// const increasePitchOption = evt.target.find({
// role: chrome.automation.RoleType.MENU_LIST_OPTION,
// attributes: {name: 'Increase pitch'}
//});
// assertNotNullNorUndefined(increasePitchOption);
// assertEquals(undefined, increasePitchOption.state.invisible);
})
.call(capitalStrategySelect.focus.bind(capitalStrategySelect))
.expectSpeech(
'When reading capitals:', 'Increase pitch', 'Collapsed');
mockFeedback.replay();
});
});
assertNotNullNorUndefined(pitchChangesCheckbox);
assertNotNullNorUndefined(capitalStrategySelect);
// Assert initial pref values.
assertEquals('true', localStorage['usePitchChanges']);
assertEquals('increasePitch', localStorage['capitalStrategy']);
mockFeedback.call(pitchChangesCheckbox.focus.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Checked')
.call(pitchChangesCheckbox.doDefault.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Not checked')
.call(() => {
assertEquals('false', localStorage['usePitchChanges']);
// Toggling usePitchChanges affects capitalStrategy. Ensure that the
// preference has been changed and that the 'Increase pitch' option
// is hidden.
assertEquals('announceCapitals', localStorage['capitalStrategy']);
// Open the menu first in order to assert this.
// const increasePitchOption = evt.target.find({
// role: chrome.automation.RoleType.MENU_LIST_OPTION,
// attributes: {name: 'Increase pitch'}
//});
// assertNotNullNorUndefined(increasePitchOption);
// assertTrue(increasePitchOption.state.invisible);
})
.call(capitalStrategySelect.focus.bind(capitalStrategySelect))
.expectSpeech(
'When reading capitals:', 'Speak "cap" before letter', 'Collapsed')
.call(pitchChangesCheckbox.doDefault.bind(pitchChangesCheckbox))
.expectSpeech(
'Change pitch when speaking element types and quoted, ' +
'deleted, bolded, parenthesized, or capitalized text.',
'Check box', 'Checked')
.call(() => {
assertEquals('true', localStorage['usePitchChanges']);
// Ensure that the capitalStrategy preference is restored to its
// initial setting and that the 'Increase pitch' option is visible
// again.
assertEquals('increasePitch', localStorage['capitalStrategy']);
// Open the menu first in order to assert this.
// const increasePitchOption = evt.target.find({
// role: chrome.automation.RoleType.MENU_LIST_OPTION,
// attributes: {name: 'Increase pitch'}
//});
// assertNotNullNorUndefined(increasePitchOption);
// assertEquals(undefined, increasePitchOption.state.invisible);
})
.call(capitalStrategySelect.focus.bind(capitalStrategySelect))
.expectSpeech('When reading capitals:', 'Increase pitch', 'Collapsed');
mockFeedback.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