bfcache: Fix ChromeBackForwardCacheBrowserTest.WebBluetooth hidden flake
ChromeBackForwardCacheBrowserTest.WebBluetooth Test is flaky. It is reported as a hidden flake as it passes on retries. Cause identified: The test configures a mock Bluetooth adapter first and then performs a web Bluetooth API call. Although in some executions, it is observed that the browser has already started the initialization of the default Bluetooth adapter, when the test configures the mock adapter changing the adapter pointer, causing that the callbacks from the default adapter try to use an already released adapter pointer, thus reading from a nullptr, and crashing the test. Fix proposed: Move the MockBluetoothAdapter out from being configured at the specific test and instead be a class member and configured at test setup. By doing this the mock adapter is configured from the beginning avoiding the callback issue observed with the default Bluetooth adapter. Bug: 1087190 Change-Id: I3f2e8bd4159f072712f1082f05e35ec24f9b2f5b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2220627 Commit-Queue: Carlos Frias <carlos.frias@microsoft.com> Reviewed-by:Alexander Timin <altimin@chromium.org> Cr-Commit-Position: refs/heads/master@{#774406}
Showing
Please register or sign in to comment