Commit c12d3a94 authored by Nina Satragno's avatar Nina Satragno Committed by Commit Bot

[webauthn] testdriver API: Add isUserConsenting

Add `isUserConsenting` to the content shell testdriver API. This lets
us run the timeout WPTs.

Fixed: 1054810, 1054655
Change-Id: Id90567818a1fcda44794294fc3527790df056870
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078833Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745147}
parent c5c70dfe
...@@ -119,6 +119,7 @@ void VirtualFidoDiscoveryFactory::CreateAuthenticator( ...@@ -119,6 +119,7 @@ void VirtualFidoDiscoveryFactory::CreateAuthenticator(
auto* authenticator = CreateAuthenticator( auto* authenticator = CreateAuthenticator(
options->protocol, options->transport, options->attachment, options->protocol, options->transport, options->attachment,
options->has_resident_key, options->has_user_verification); options->has_resident_key, options->has_user_verification);
authenticator->SetUserPresence(options->is_user_present);
std::move(callback).Run(GetMojoToVirtualAuthenticator(authenticator)); std::move(callback).Run(GetMojoToVirtualAuthenticator(authenticator));
} }
......
...@@ -20,6 +20,7 @@ struct VirtualAuthenticatorOptions { ...@@ -20,6 +20,7 @@ struct VirtualAuthenticatorOptions {
blink.mojom.AuthenticatorAttachment attachment; blink.mojom.AuthenticatorAttachment attachment;
bool has_resident_key; bool has_resident_key;
bool has_user_verification; bool has_user_verification;
bool is_user_present = true;
}; };
// Encapsulates both public (key handle) and private information associated // Encapsulates both public (key handle) and private information associated
......
This is a testharness.js-based test.
FAIL ensure create credential times out assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL WebAuthn navigator.credentials.get() timeout Tests assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
...@@ -322,6 +322,7 @@ ...@@ -322,6 +322,7 @@
} }
mojoOptions.hasResidentKey = options.hasResidentKey; mojoOptions.hasResidentKey = options.hasResidentKey;
mojoOptions.hasUserVerification = options.hasUserVerification; mojoOptions.hasUserVerification = options.hasUserVerification;
mojoOptions.isUserPresent = options.isUserConsenting;
let authenticator = (await manager.createAuthenticator(mojoOptions)).authenticator; let authenticator = (await manager.createAuthenticator(mojoOptions)).authenticator;
return (await authenticator.getUniqueId()).id; return (await authenticator.getUniqueId()).id;
......
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