Commit 586bdb30 authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

Fix test flake for Crostini settings page.

The flake was in the setting page's existence test for the
"Upgrade Available" section. The existence is determined by a value that
is initialized from loadTimeData and updated from a webUIListener.

There was a race between loadTimeData's default "true" value and the
webUIListenerCallback's replacement "false" which would change right
when the page was loading, so the settings test would see the
occasional "false" instead of expected "true" and fail.

Bug: 1057823
Change-Id: I3822eda06c5631c2328f80891f9f5e5de4821172
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083773
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Auto-Submit: Nicholas Verne <nverne@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746236}
parent 563d1e4d
...@@ -90,7 +90,7 @@ class TestCrostiniBrowserProxy extends TestBrowserProxy { ...@@ -90,7 +90,7 @@ class TestCrostiniBrowserProxy extends TestBrowserProxy {
/** @override */ /** @override */
requestCrostiniContainerUpgradeAvailable() { requestCrostiniContainerUpgradeAvailable() {
cr.webUIListenerCallback( cr.webUIListenerCallback(
'crostini-container-upgrade-available-changed', false); 'crostini-container-upgrade-available-changed', true);
} }
/** @override */ /** @override */
......
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