getcredential-passing.https.html (3340B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>WebAuthn credential.get() Passing 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 var credPromise = createCredential(); 18 19 // GetCredentialsTest with default args 20 new GetCredentialsTest() 21 .addCredential(credPromise) 22 .runTest("passing credentials.get() with default args"); 23 24 // timeout 25 new GetCredentialsTest({path: "options.publicKey.timeout", value: undefined}) 26 .addCredential(credPromise) 27 .runTest("passing credentials.create() with no timeout"); 28 29 // rpId 30 new GetCredentialsTest({path: "options.publicKey.rpId", value: undefined}) 31 .addCredential(credPromise) 32 .runTest("rpId undefined"); 33 new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.hostname}) 34 .addCredential(credPromise) 35 .runTest("passing credentials.get() with rpId (hostname)"); 36 37 // authnr selection user verification 38 new GetCredentialsTest({path: "options.publicKey.userVerification", value: undefined}) 39 .addCredential(credPromise) 40 .runTest("authenticatorSelection userVerification undefined"); 41 new GetCredentialsTest("options.publicKey.userVerification", "preferred") 42 .addCredential(credPromise) 43 .runTest("authenticatorSelection userVerification preferred"); 44 new GetCredentialsTest("options.publicKey.userVerification", "discouraged") 45 .addCredential(credPromise) 46 .runTest("authenticatorSelection userVerification discouraged"); 47 new GetCredentialsTest("options.publicKey.userVerification", "") 48 .addCredential(credPromise) 49 .runTest("authenticatorSelection userVerification empty string"); 50 new GetCredentialsTest("options.publicKey.userVerification", {}) 51 .addCredential(credPromise) 52 .runTest("authenticatorSelection userVerification empty object"); 53 new GetCredentialsTest("options.publicKey.userVerification", "requiredshirtshoestshirt") 54 .addCredential(credPromise) 55 .runTest("authenticatorSelection userVerification unknown value"); 56 new GetCredentialsTest("options.publicKey.userVerification", null) 57 .addCredential(credPromise) 58 .runTest("authenticatorSelection userVerification null"); 59 60 // good extension values 61 new GetCredentialsTest({path: "options.publicKey.extensions", value: undefined}) 62 .addCredential(credPromise) 63 .runTest("extensions undefined"); 64 new GetCredentialsTest("options.publicKey.extensions", {}) 65 .addCredential(credPromise) 66 .runTest("extensions are empty object"); 67 new GetCredentialsTest("options.publicKey.extensions", {foo: "", bar: "", bat: ""}) 68 .addCredential(credPromise) 69 .runTest("extensions are dict of empty strings"); 70 }); 71 72 /* JSHINT */ 73 /* globals standardSetup, GetCredentialsTest, createCredential */ 74 </script>