Commit 3d002054 authored by Ken Buchanan's avatar Ken Buchanan Committed by Commit Bot

[WebAuthn] Don't record IsUVPAA metric if browser process closed

ProfileListDesktopBrowserTest.Signout was flakily crashing when the
task for recording the IsUVPAA metric was executing during browser
shut down. This is a speculative fix to abort the task if the browser
process is unavailable, and also re-enable the test.

Bug: 1109768
Change-Id: I15597948850d40773c563029a8ea247f1557ef90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321290Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792041}
parent 3db82863
......@@ -42,6 +42,10 @@ void ReportUVPlatformAuthenticatorAvailabilityWithConfig(
void ReportUVPlatformAuthenticatorAvailabilityMainThreadMac() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
// Tests can shut down before this task is run.
if (!g_browser_process)
return;
// Startup metrics are recording during PostBrowserStart() which is after
// profile initialization. However some tests run PostBrowserStart() without
// setting up profiles so there still needs to be a guard.
......
......@@ -55,9 +55,9 @@ class ProfileListDesktopBrowserTest : public InProcessBrowserTest {
DISALLOW_COPY_AND_ASSIGN(ProfileListDesktopBrowserTest);
};
#if defined(OS_WIN) || defined(OS_MACOSX)
#if defined(OS_WIN) || (defined(OS_MACOSX) && defined(ADDRESS_SANITIZER))
// SignOut is flaky on Windows, crbug.com/357329,
// and Mac (crbug.com/674497, crbug.com/1109768).
// and Mac with ASAN, crbug.com/674497.
#define MAYBE_SignOut DISABLED_SignOut
#elif defined(OS_CHROMEOS)
// This test doesn't make sense for Chrome OS since it has a different
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment