| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>WebAuthn makeCredential accountInformation Tests</title> |
| <link rel="author" title="Adam Powers" href="mailto:adam@fidoalliance.org"> |
| <link rel="help" href="https://w3c.github.io/webauthn/#iface-credential"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src=helpers.js></script> |
| <body></body> |
| <script> |
| standardSetup(function() { |
| "use strict"; |
| |
| // accountInformation bad values |
| new MakeCredentialTest({path: "accountInformation", value: undefined}).testBadArgs("accountInformation missing"); |
| new MakeCredentialTest("accountInformation", "hi mom").testBadArgs("accountInformation is string"); |
| new MakeCredentialTest("accountInformation", {}).testBadArgs("accountInformation is empty object"); |
| // accountInformation.rpDisplayName |
| new MakeCredentialTest({path: "accountInformation.rpDisplayName", value: undefined}).testBadArgs("accountInformation missing rpDisplayName"); |
| new MakeCredentialTest("accountInformation.rpDisplayName", {}).testBadArgs("Bad accountInformation: rpDisplayName is object"); |
| new MakeCredentialTest("accountInformation.rpDisplayName", null).testBadArgs("Bad accountInformation: rpDisplayName is null"); |
| new MakeCredentialTest("accountInformation.rpDisplayName", "").testBadArgs("Bad accountInformation: rpDisplayName is empty String"); |
| // accountInformation.displayName |
| new MakeCredentialTest({path: "accountInformation.displayName", value: undefined}).testBadArgs("accountInformation missing displayName"); |
| new MakeCredentialTest("accountInformation.displayName", {}).testBadArgs("Bad accountInformation: displayName is object"); |
| new MakeCredentialTest("accountInformation.displayName", null).testBadArgs("Bad accountInformation: displayName is null"); |
| new MakeCredentialTest("accountInformation.displayName", "").testBadArgs("Bad accountInformation: displayName is empty String"); |
| // accountInformation.id |
| new MakeCredentialTest({path: "accountInformation.id", value: undefined}).testBadArgs("accountInformation missing id"); |
| new MakeCredentialTest("accountInformation.id", {}).testBadArgs("Bad accountInformation: id is object"); |
| new MakeCredentialTest("accountInformation.id", null).testBadArgs("Bad accountInformation: id is null"); |
| new MakeCredentialTest("accountInformation.id", "").testBadArgs("Bad accountInformation: id is empty String"); |
| }); |
| </script> |