diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/webauthn/interfaces.https.any.js')
-rw-r--r-- | tests/wpt/web-platform-tests/webauthn/interfaces.https.any.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/webauthn/interfaces.https.any.js b/tests/wpt/web-platform-tests/webauthn/interfaces.https.any.js new file mode 100644 index 00000000000..bd5f9dc4a28 --- /dev/null +++ b/tests/wpt/web-platform-tests/webauthn/interfaces.https.any.js @@ -0,0 +1,30 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +if (self.importScripts) { + importScripts('/resources/testharness.js'); + importScripts('/resources/WebIDLParser.js', '/resources/idlharness.js'); +} + +// https://w3c.github.io/webauthn/ + +promise_test(async () => { + const webauthnIdl = await fetch('/interfaces/webauthn.idl').then(r => r.text()); + + const idlArray = new IdlArray(); + idlArray.add_idls(webauthnIdl); + + // static IDL tests + idlArray.add_untested_idls('interface CredentialCreationOptions {};'); + idlArray.add_untested_idls('interface CredentialRequestOptions {};'); + idlArray.add_untested_idls("interface Navigator { };"); + // TODO: change to "tested" for real browsers? + idlArray.add_untested_idls("partial interface Navigator { readonly attribute WebAuthentication authentication; };"); + idlArray.add_objects({ + WebAuthentication: ["navigator.authentication"] + }); + idlArray.test(); + done(); +}, 'WebAuthn interfaces.'); |