[webauthn] Deflake inline enrollment UI test
Deflake AuthenticatorDialogTest.InvokeUi_inline_bio_enrollment. If the timer fired between the dialog being destroyed and the test being destroyed, we had a use-after-free of the raw pointer to the model. Solve this by using a WeakPtr. Additionally, if the current step changed by e.g. a user running the test interactively, we hit a DCHECK on OnSampleCollected since the current step was no longer inline bio enrollment. Fix this by checking the current step before running the callback. This fix is okay since the main point of this test is to run interactively to try the UI and as a basic sanity check. Fixed: 1092314 Change-Id: I5cec125de3a921df8b7e7a44d5cb1feedf634f4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235979 Commit-Queue: Nina Satragno <nsatragno@chromium.org> Commit-Queue: Martin Kreichgauer <martinkr@google.com> Auto-Submit: Nina Satragno <nsatragno@chromium.org> Reviewed-by:Martin Kreichgauer <martinkr@google.com> Cr-Commit-Position: refs/heads/master@{#776095}
Showing
Please register or sign in to comment