4 <title>Test for W3C Web Authentication isUserVerifyingPlatformAuthenticatorAvailable
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <script type=
"text/javascript" src=
"u2futil.js"></script>
7 <script type=
"text/javascript" src=
"pkijs/common.js"></script>
8 <script type=
"text/javascript" src=
"pkijs/asn1.js"></script>
9 <script type=
"text/javascript" src=
"pkijs/x509_schema.js"></script>
10 <script type=
"text/javascript" src=
"pkijs/x509_simpl.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
15 <h1>Test for W3C Web Authentication isUserVerifyingPlatformAuthenticatorAvailable
</h1>
16 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1309284">Mozilla Bug
1309284</a>
18 <script class=
"testbody" type=
"text/javascript">
21 add_task(async function test_uvpaa_with_no_authenticator() {
22 let uvpaa = await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
23 ok(uvpaa === false,
"Platform authenticator is not available");
26 add_task(async () =
> {
27 await addVirtualAuthenticator(
"ctap2_1",
"usb");
30 add_task(async function test_uvpaa_with_usb_authenticator() {
31 let uvpaa = await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
32 ok(uvpaa === false,
"Platform authenticator is not available");
35 add_task(async () =
> {
36 await addVirtualAuthenticator(
"ctap2_1",
"internal");
39 add_task(async function test_uvpaa_with_usb_and_platform_authenticator() {
40 let uvpaa = await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
41 ok(uvpaa === true,
"Platform authenticator is available");