[BrowserSwitcher] Deflake BrowserSwitcherServiceTest
Previously, the tests waited for action_timeout(), to wait for LBS to load the rules and write some files. As expected, this is fairly flaky, and it slows down the tests. Now, `BrowserSwitcherService' exposes a new event for testing, which fires once LBS has loaded the rules. This should reduce flakes by listening for the event instead of using an unreliable timeout. Also rewrote some tests in a synchronous style, which improves readability. Bug: 1044619, 1070400 Change-Id: If1a2093cfe3bface73a46896ff2bc95b80ab2f2e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152885 Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Reviewed-by:Julian Pastarmov <pastarmovj@chromium.org> Cr-Commit-Position: refs/heads/master@{#760531}
Showing
This diff is collapsed.
Please register or sign in to comment