2 // META: script=/resources/WebIDLParser.js
3 // META: script=/resources/idlharness.js
4 // META: script=helpers.js
6 // https://w3c.github.io/webauthn/
11 const execute_test = () => idl_test(
13 ['credential-management'],
15 idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface ArrayBuffer {};");
16 idlArray.add_objects({
17 WebAuthentication: ['navigator.authentication'],
18 PublicKeyCredential: ['cred'],
19 AuthenticatorAssertionResponse: ['assertionResponse']
24 let challengeBytes = new Uint8Array(16);
25 window.crypto.getRandomValues(challengeBytes);
27 return createCredential({
32 id: new Uint8Array(16),
39 return navigator.credentials.get({
44 transports: ["usb", "nfc", "ble"],
47 challenge: challengeBytes,
52 self.assertionResponse = assertion.response;
57 return Promise.reject(reason);