summaryrefslogtreecommitdiffstats
path: root/dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html')
-rw-r--r--dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html b/dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html
new file mode 100644
index 0000000000..c3910cd96d
--- /dev/null
+++ b/dom/webauthn/tests/test_webauthn_isplatformauthenticatoravailable.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<head>
+ <title>Test for W3C Web Authentication isUserVerifyingPlatformAuthenticatorAvailable</title>
+ <script src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="u2futil.js"></script>
+ <script type="text/javascript" src="pkijs/common.js"></script>
+ <script type="text/javascript" src="pkijs/asn1.js"></script>
+ <script type="text/javascript" src="pkijs/x509_schema.js"></script>
+ <script type="text/javascript" src="pkijs/x509_simpl.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+
+<h1>Test for W3C Web Authentication isUserVerifyingPlatformAuthenticatorAvailable</h1>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1309284">Mozilla Bug 1309284</a>
+
+<script class="testbody" type="text/javascript">
+"use strict";
+
+// Execute the full-scope test
+SimpleTest.waitForExplicitFinish();
+
+add_task(async function test_is_platform_available() {
+ // This test ensures that isUserVerifyingPlatformAuthenticatorAvailable()
+ // is a callable method, but with the softtoken enabled, it's not useful to
+ // figure out what it actually returns, so we'll just make sure it runs.
+ await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
+ .then(function(aResult) {
+ ok(true, "Resolved: " + aResult);
+ })
+ .catch(function(aProblem) {
+ ok(false, "Problem encountered: " + aProblem);
+ });
+});
+
+</script>
+
+</body>
+</html>