diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/webauthn/getcredential-passing.https.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webauthn/getcredential-passing.https.html')
-rw-r--r-- | testing/web-platform/tests/webauthn/getcredential-passing.https.html | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webauthn/getcredential-passing.https.html b/testing/web-platform/tests/webauthn/getcredential-passing.https.html new file mode 100644 index 0000000000..7c730d7183 --- /dev/null +++ b/testing/web-platform/tests/webauthn/getcredential-passing.https.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>WebAuthn credential.get() Passing Tests</title> +<meta name="timeout" content="long"> +<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="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src=helpers.js></script> +<body></body> +<script> +standardSetup(function() { + "use strict"; + + var credPromise = createCredential(); + + // GetCredentialsTest with default args + new GetCredentialsTest() + .addCredential(credPromise) + .runTest("passing credentials.get() with default args"); + + // timeout + new GetCredentialsTest({path: "options.publicKey.timeout", value: undefined}) + .addCredential(credPromise) + .runTest("passing credentials.create() with no timeout"); + + // rpId + new GetCredentialsTest({path: "options.publicKey.rpId", value: undefined}) + .addCredential(credPromise) + .runTest("rpId undefined"); + new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.hostname}) + .addCredential(credPromise) + .runTest("passing credentials.get() with rpId (hostname)"); + + // authnr selection user verification + new GetCredentialsTest({path: "options.publicKey.userVerification", value: undefined}) + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification undefined"); + new GetCredentialsTest("options.publicKey.userVerification", "preferred") + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification preferred"); + new GetCredentialsTest("options.publicKey.userVerification", "discouraged") + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification discouraged"); + new GetCredentialsTest("options.publicKey.userVerification", "") + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification empty string"); + new GetCredentialsTest("options.publicKey.userVerification", {}) + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification empty object"); + new GetCredentialsTest("options.publicKey.userVerification", "requiredshirtshoestshirt") + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification unknown value"); + new GetCredentialsTest("options.publicKey.userVerification", null) + .addCredential(credPromise) + .runTest("authenticatorSelection userVerification null"); + + // good extension values + new GetCredentialsTest({path: "options.publicKey.extensions", value: undefined}) + .addCredential(credPromise) + .runTest("extensions undefined"); + new GetCredentialsTest("options.publicKey.extensions", {}) + .addCredential(credPromise) + .runTest("extensions are empty object"); + new GetCredentialsTest("options.publicKey.extensions", {foo: "", bar: "", bat: ""}) + .addCredential(credPromise) + .runTest("extensions are dict of empty strings"); +}); + +/* JSHINT */ +/* globals standardSetup, GetCredentialsTest, createCredential */ +</script> |