tor-browser

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

storecredential.https.html (860B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <meta name="timeout" content="long">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 <script src=helpers.js></script>
      9 <script>
     10    "use strict";
     11 
     12    virtualAuthenticatorPromiseTest(async t => {
     13        const cred = await navigator.credentials.get({publicKey: {
     14            challenge: new Uint8Array(),
     15            allowCredentials: [{
     16                id: (await createCredential()).rawId,
     17                type: "public-key",
     18            }],
     19        }});
     20        return promise_rejects_dom(t, "NotSupportedError", navigator.credentials.store(cred));
     21    }, {}, "navigator.credentials.store() throws NotAllowedError with a public key credential");
     22 
     23 </script>