commit 227a507f32f155eb4970522c4d463abb488e3b0a parent be57d48739e20a866d522a37ec6499919bda675f Author: John M. Schanck <jschanck@mozilla.com> Date: Tue, 28 Oct 2025 20:16:12 +0000 Bug 1996928 - correctly report presence of a webauthn user-verifying platform authenticator in tests. r=keeler Differential Revision: https://phabricator.services.mozilla.com/D270378 Diffstat:
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dom/webauthn/authrs_bridge/src/lib.rs b/dom/webauthn/authrs_bridge/src/lib.rs @@ -740,7 +740,9 @@ impl AuthrsService { if static_prefs::pref!("security.webauth.webauthn_enable_usbtoken") { Ok(false) } else if static_prefs::pref!("security.webauth.webauthn_enable_softtoken") { - Ok(self.test_token_manager.has_platform_authenticator()) + Ok(self + .test_token_manager + .has_user_verifying_platform_authenticator()) } else { Err(NS_ERROR_NOT_AVAILABLE) } diff --git a/dom/webauthn/authrs_bridge/src/test_token.rs b/dom/webauthn/authrs_bridge/src/test_token.rs @@ -990,14 +990,14 @@ impl TestTokenManager { .dispatch_background_task(); } - pub fn has_platform_authenticator(&self) -> bool { + pub fn has_user_verifying_platform_authenticator(&self) -> bool { if !static_prefs::pref!("security.webauth.webauthn_enable_softtoken") { return false; } for token in self.state.lock().unwrap().values_mut() { let _ = token.init(); - if token.transport.as_str() == "internal" { + if token.transport.as_str() == "internal" && token.has_user_verification { return true; } } diff --git a/testing/web-platform/meta/webauthn/isuserverifyingplatformauthenticatoravailable.https.html.ini b/testing/web-platform/meta/webauthn/isuserverifyingplatformauthenticatoravailable.https.html.ini @@ -1,3 +0,0 @@ -[isuserverifyingplatformauthenticatoravailable.https.html] - [Non-user-verifying platform authenticator] - expected: FAIL