[Fuchsia] Initialize NetworkChangeNotifierFuchsia synchronously.
Previously NetworkChangeNotifierFuchsia would start in the UNKNOWN state and dispatch an asynchronous request for interface and route information. This could result in the network state not becoming available until after requests had been started, causing them to be cancelled with ERR_NETWORK_CHANGED. NetworkChangeNotifierFuchsiaTests now run the FakeNetstack on a separate thread, requiring explicit synchronization to ensure that requests are processed before expectations are checked. The tests are also migrated to verify OnIPAddressChanged() and OnConnectionTypeChanged() rather than the derived OnNetworkChanged() signal. Bug: 964161, b/130731732 Change-Id: Ibb59f676468e66190ccc5b88af8e492a5102f8db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616324 Commit-Queue: Wez <wez@chromium.org> Reviewed-by:Sergey Ulanov <sergeyu@chromium.org> Auto-Submit: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#661082}
Showing
This diff is collapsed.
Please register or sign in to comment