Commit e380470d authored by David Tseng's avatar David Tseng Committed by Commit Bot

Un-flake ChromeVoxBackgroundTest.ReadWindowTitle

This test attempted to wait for "foo" (the initial window title to be correctly read), however, we were getting
"  'Untitled - Chromium - User 1' properties={"category":"nav"}"
read out instead. This may indicate some races in the population of the window title under heavy load.

This wasn't the intent of the test though which covers only the reading of the title once it changes (from the initial value).

Removing this first expectation makes the test run without flaking.

Fixed: 1060001
Change-Id: I354f08c99299c315b980d15ab69fa11a0eddaa0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111275Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751909}
parent 6d51b2ee
...@@ -2457,7 +2457,6 @@ TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', function() { ...@@ -2457,7 +2457,6 @@ TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', function() {
<p>start</p> <p>start</p>
<button id="click"></button> <button id="click"></button>
<script> <script>
document.title = 'foo';
const button = document.getElementById('click'); const button = document.getElementById('click');
button.addEventListener('click', _ => document.title = 'bar'); button.addEventListener('click', _ => document.title = 'bar');
</script> </script>
...@@ -2476,10 +2475,8 @@ TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', function() { ...@@ -2476,10 +2475,8 @@ TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', function() {
}; };
mockFeedback.clearPendingOutput() mockFeedback.clearPendingOutput()
.call(doCmd('readCurrentTitle'))
.expectSpeech(/^foo/)
.call(clickButtonThenReadCurrentTitle) .call(clickButtonThenReadCurrentTitle)
.expectSpeech(/^bar/) .expectSpeech(/^bar - Chromium*/)
.replay(); .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