Fix geolocation-api/watchPosition-page-visibility
The mock geolocation service expects a new position to be set by the time any new queryNextPosition request arrives. This test was designed to call watchPosition and iterate over multiple steps, with each step updating the mock position so that the watcher's next queryNextPosition can be appropriately satisfied. Unfortunately one of the steps does asynchronous work before updating the mock position, so if the mock happens to receive a queryNextPosition on behalf of the watcher before that work completes, it will throw and fail the test. Flake ensues. This addresses the issue by more carefully synchronizing the mock state against the test logic, ensuring that stray queryNextPosition handling is deferred during the asynchronous work. Fixed: 1083824 Change-Id: I53b60d1104616bc1644573b48271823060698569 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2634006 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by:Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#844298}
Showing
Please register or sign in to comment