2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/WebIDLParser.js"></script>
5 <script src="../resources/idlharness.js"></script>
7 <h1>idlharness test</h1>
8 <p>This test validates the WebIDL included in the Credential Management API.</p>
10 <script type="text/plain" class="untested-idl">
14 <script type="text/plain" class="idl">
17 dictionary CredentialData {
18 required USVString id;
21 [SecureContext] interface Credential {
22 readonly attribute USVString id;
23 readonly attribute DOMString type;
26 // No Transferable at this moment
27 // Credential implements Transferable;
29 dictionary SiteBoundCredentialData : CredentialData {
34 [SecureContext] interface SiteBoundCredential : Credential {
35 readonly attribute USVString name;
36 readonly attribute USVString iconURL;
39 // 3.1.3 PasswordCredential
41 dictionary PasswordCredentialData : SiteBoundCredentialData {
42 required USVString password;
45 typedef (FormData or URLSearchParams) CredentialBodyType;
47 [Constructor(PasswordCredentialData data),
48 Constructor(HTMLFormElement form),
51 interface PasswordCredential : SiteBoundCredential {
52 attribute USVString idName;
53 attribute USVString passwordName;
55 attribute CredentialBodyType? additionalData;
61 function select(selector) {
62 return [].slice.call(document.querySelectorAll(selector))
63 .map(function(e) { return e.textContent; })
67 var idl = select('.idl')
68 var untested = select('.untested-idl');
69 var idl_array = new IdlArray();
70 idl_array.add_untested_idls(untested);
71 idl_array.add_idls(idl);
72 idl_array.add_objects({
73 PasswordCredential: ['new PasswordCredential({ password: "12345", id: "12345" })'],