diff --git a/dom/webauthn/authrs_bridge/src/test_token.rs b/dom/webauthn/authrs_bridge/src/test_token.rs index 3bf53ff2a397..db42eed49e8d 100644 --- a/dom/webauthn/authrs_bridge/src/test_token.rs +++ b/dom/webauthn/authrs_bridge/src/test_token.rs @@ -265,8 +265,16 @@ impl FidoDeviceIO for TestToken { } impl VirtualFidoDevice for TestToken { - fn check_key_handle(&self, _req: &CheckKeyHandle) -> Result<(), HIDError> { - Err(HIDError::UnsupportedCommand) + fn check_key_handle(&self, req: &CheckKeyHandle) -> Result<(), HIDError> { + let credlist = self.credentials.borrow(); + let req_rp_hash = req.rp.hash(); + let eligible_cred_iter = credlist.iter().filter(|x| x.rp.hash() == req_rp_hash); + for credential in eligible_cred_iter { + if req.key_handle == credential.id { + return Ok(()); + } + } + Err(HIDError::DeviceError) } fn client_pin(&self, req: &ClientPIN) -> Result { diff --git a/testing/web-platform/meta/webauthn/createcredential-excludecredentials.https.html.ini b/testing/web-platform/meta/webauthn/createcredential-excludecredentials.https.html.ini new file mode 100644 index 000000000000..663ca3c2f485 --- /dev/null +++ b/testing/web-platform/meta/webauthn/createcredential-excludecredentials.https.html.ini @@ -0,0 +1,3 @@ +[createcredential-excludecredentials.https.html] + [exclude existing credential] + expected: FAIL diff --git a/testing/web-platform/meta/webauthn/getcredential-extensions.https.html.ini b/testing/web-platform/meta/webauthn/getcredential-extensions.https.html.ini index b7883d1710ea..d9b831b06949 100644 --- a/testing/web-platform/meta/webauthn/getcredential-extensions.https.html.ini +++ b/testing/web-platform/meta/webauthn/getcredential-extensions.https.html.ini @@ -1,21 +1,9 @@ [getcredential-extensions.https.html] - [extensions is null] - expected: FAIL - - [extensions is empty Array] - expected: FAIL - - [extensions is empty ArrayBuffer] - expected: FAIL - - [ignored extension] - expected: FAIL - - [extension ID too long] - expected: FAIL - [credProps is only supported at registration] expected: FAIL [navigator.credentials.get() with prf requested but no support in authenticator] expected: FAIL + + [Payment extension is only supported at registration] + expected: FAIL diff --git a/testing/web-platform/meta/webauthn/getcredential-passing.https.html.ini b/testing/web-platform/meta/webauthn/getcredential-passing.https.html.ini deleted file mode 100644 index fb683e1d3296..000000000000 --- a/testing/web-platform/meta/webauthn/getcredential-passing.https.html.ini +++ /dev/null @@ -1,42 +0,0 @@ -[getcredential-passing.https.html] - [passing credentials.get() with default args] - expected: FAIL - - [passing credentials.create() with no timeout] - expected: FAIL - - [rpId undefined] - expected: FAIL - - [passing credentials.get() with rpId (hostname)] - expected: FAIL - - [authenticatorSelection userVerification undefined] - expected: FAIL - - [authenticatorSelection userVerification preferred] - expected: FAIL - - [authenticatorSelection userVerification discouraged] - expected: FAIL - - [authenticatorSelection userVerification empty string] - expected: FAIL - - [authenticatorSelection userVerification empty object] - expected: FAIL - - [authenticatorSelection userVerification unknown value] - expected: FAIL - - [authenticatorSelection userVerification null] - expected: FAIL - - [extensions undefined] - expected: FAIL - - [extensions are empty object] - expected: FAIL - - [extensions are dict of empty strings] - expected: FAIL diff --git a/testing/web-platform/meta/webauthn/getcredential-timeout.https.html.ini b/testing/web-platform/meta/webauthn/getcredential-timeout.https.html.ini new file mode 100644 index 000000000000..80e08ab2a333 --- /dev/null +++ b/testing/web-platform/meta/webauthn/getcredential-timeout.https.html.ini @@ -0,0 +1,3 @@ +[getcredential-timeout.https.html] + [WebAuthn navigator.credentials.get() timeout Tests] + expected: FAIL diff --git a/testing/web-platform/meta/webauthn/webauthn-testdriver-basic.https.html.ini b/testing/web-platform/meta/webauthn/webauthn-testdriver-basic.https.html.ini deleted file mode 100644 index 4e2d79a375b7..000000000000 --- a/testing/web-platform/meta/webauthn/webauthn-testdriver-basic.https.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[webauthn-testdriver-basic.https.html] - [Get an assertion] - expected: FAIL