tor-browser

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

createcredential-badargs-challenge.https.html (1378B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>WebAuthn navigator.credentials.create() challenge Tests</title>
      4 <meta name="timeout" content="long">
      5 <link rel="author" title="Adam Powers" href="mailto:adam@fidoalliance.org">
      6 <link rel="help" href="https://w3c.github.io/webauthn/#iface-credential">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/resources/testdriver.js"></script>
     10 <script src="/resources/testdriver-vendor.js"></script>
     11 <script src=helpers.js></script>
     12 <body></body>
     13 <script>
     14 standardSetup(function() {
     15    "use strict";
     16 
     17    // bad challenge values
     18    new CreateCredentialsTest({path: "options.publicKey.challenge", value: undefined}).runTest("Bad challenge: challenge missing", TypeError);
     19    new CreateCredentialsTest("options.publicKey.challenge", "hi mom").runTest("Bad challenge: challenge is string", TypeError);
     20    new CreateCredentialsTest("options.publicKey.challenge", null).runTest("Bad challenge: challenge is null", TypeError);
     21    new CreateCredentialsTest("options.publicKey.challenge", {}).runTest("Bad challenge: challenge is empty object", TypeError);
     22    new CreateCredentialsTest("options.publicKey.challenge", new Array()).runTest("Bad challenge: challenge is empty Array", TypeError);
     23 });
     24 
     25 /* JSHINT */
     26 /* globals standardSetup, CreateCredentialsTest */
     27 </script>