tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

createcredential-minpinlength.https.html (1168B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>navigator.credentials.create() largeBlob extension tests with authenticator support</title>
      4 <meta name="timeout" content="long">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="/resources/testdriver.js"></script>
      8 <script src="/resources/testdriver-vendor.js"></script>
      9 <script src=helpers.js></script>
     10 <body></body>
     11 <script>
     12 standardSetup(function() {
     13  "use strict";
     14 
     15  promise_test(async t => {
     16    const credential = await createCredential({
     17      options: {
     18        publicKey: {
     19          extensions: {
     20            minPinLength: true,
     21          },
     22        },
     23      },
     24    });
     25    // The extension results will be in the authenticator outputs.
     26    assert_true(new Uint8Array(credential.response.getAuthenticatorData())
     27                    .toString()
     28                    .includes(new TextEncoder()
     29                                  .encode("minPinLength")
     30                                  .toString()));
     31  }, "navigator.credentials.create() with minPinLength requested");
     32 }, {
     33  protocol: "ctap2_1",
     34  extensions: ["minPinLength"],
     35 });
     36 </script>