| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src=/resources/testharness.js></script> | 2 <script src=/resources/testharness.js></script> |
| 3 <script src=/resources/testharnessreport.js></script> | 3 <script src=/resources/testharnessreport.js></script> |
| 4 <script src=/resources/WebIDLParser.js></script> | 4 <script src=/resources/WebIDLParser.js></script> |
| 5 <script src=/resources/idlharness.js></script> | 5 <script src=/resources/idlharness.js></script> |
| 6 <script type="text/plain" id="untested"> | 6 <script type="text/plain" id="untested"> |
| 7 dictionary CredentialData { | 7 dictionary CredentialData { |
| 8 USVString id; | 8 USVString id; |
| 9 }; | 9 }; |
| 10 | 10 |
| 11 [Exposed=Window, SecureContext] | 11 [Exposed=Window, SecureContext] |
| 12 interface Credential { | 12 interface Credential { |
| 13 readonly attribute USVString id; | 13 readonly attribute USVString id; |
| 14 readonly attribute DOMString type; | 14 readonly attribute DOMString type; |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 [NoInterfaceObject, SecureContext] | 17 [NoInterfaceObject, SecureContext] |
| 18 interface CredentialUserData { | 18 interface CredentialUserData { |
| 19 readonly attribute USVString name; | 19 readonly attribute USVString name; |
| 20 readonly attribute USVString iconURL; | 20 readonly attribute USVString iconURL; |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 dictionary PasswordCredentialData : CredentialData { | 23 dictionary PasswordCredentialData : CredentialData { |
| 24 USVString name; | 24 USVString name; |
| 25 USVString iconURL; | 25 USVString iconURL; |
| 26 required USVString password; | 26 required USVString password; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 typedef (PasswordCredentialData or HTMLFormElement) PasswordCredentialInit; |
| 30 |
| 29 typedef (FormData or URLSearchParams) CredentialBodyType; | 31 typedef (FormData or URLSearchParams) CredentialBodyType; |
| 30 | 32 |
| 31 | 33 |
| 32 dictionary FederatedCredentialInit : CredentialData { | 34 dictionary FederatedCredentialInit : CredentialData { |
| 33 USVString name; | 35 USVString name; |
| 34 USVString iconURL; | 36 USVString iconURL; |
| 35 required USVString provider; | 37 required USVString provider; |
| 36 DOMString protocol; | 38 DOMString protocol; |
| 37 }; | 39 }; |
| 38 | 40 |
| 41 dictionary CredentialCreationOptions { |
| 42 PasswordCredentialInit? password; |
| 43 FederatedCredentialInit? federated; |
| 44 }; |
| 45 |
| 39 dictionary CredentialRequestOptions { | 46 dictionary CredentialRequestOptions { |
| 40 boolean password = false; | 47 boolean password = false; |
| 41 FederatedCredentialRequestOptions federated; | 48 FederatedCredentialRequestOptions federated; |
| 42 | 49 |
| 43 boolean unmediated = false; | 50 boolean unmediated = false; |
| 44 }; | 51 }; |
| 45 | 52 |
| 46 dictionary FederatedCredentialRequestOptions { | 53 dictionary FederatedCredentialRequestOptions { |
| 47 sequence<USVString> providers; | 54 sequence<USVString> providers; |
| 48 sequence<DOMString> protocols; | 55 sequence<DOMString> protocols; |
| 49 }; | 56 }; |
| 50 | 57 |
| 51 </script> | 58 </script> |
| 52 <script type="text/plain" id="tested"> | 59 <script type="text/plain" id="tested"> |
| 53 interface CredentialsContainer { | 60 interface CredentialsContainer { |
| 54 Promise<Credential> get(optional CredentialRequestOptions options); | 61 Promise<Credential> get(optional CredentialRequestOptions options); |
| 55 Promise<Credential> store(Credential credential); | 62 Promise<Credential> store(Credential credential); |
| 63 Promise<Credential?> create(optional CredentialCreationOptions options); |
| 56 Promise<void> requireUserMediation(); | 64 Promise<void> requireUserMediation(); |
| 57 }; | 65 }; |
| 58 | 66 |
| 59 [Constructor(PasswordCredentialData data), | 67 [Constructor(PasswordCredentialData data), |
| 60 Constructor(HTMLFormElement form), | 68 Constructor(HTMLFormElement form), |
| 61 Exposed=Window, | 69 Exposed=Window, |
| 62 SecureContext] | 70 SecureContext] |
| 63 interface PasswordCredential : Credential { | 71 interface PasswordCredential : Credential { |
| 64 attribute USVString idName; | 72 attribute USVString idName; |
| 65 attribute USVString passwordName; | 73 attribute USVString passwordName; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 83 idl_array.add_untested_idls(document.querySelector('#untested').textContent)
; | 91 idl_array.add_untested_idls(document.querySelector('#untested').textContent)
; |
| 84 idl_array.add_idls(document.querySelector('#tested').textContent); | 92 idl_array.add_idls(document.querySelector('#tested').textContent); |
| 85 idl_array.add_objects({ | 93 idl_array.add_objects({ |
| 86 CredentialsContainer: ['navigator.credentials'], | 94 CredentialsContainer: ['navigator.credentials'], |
| 87 PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil
", iconURL: "https://example.com/", name: "name" })'], | 95 PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil
", iconURL: "https://example.com/", name: "name" })'], |
| 88 FederatedCredential: ['new FederatedCredential({ id: "id", provider: "http
s://example.com", iconURL: "https://example.com/", name: "name" })'] | 96 FederatedCredential: ['new FederatedCredential({ id: "id", provider: "http
s://example.com", iconURL: "https://example.com/", name: "name" })'] |
| 89 }); | 97 }); |
| 90 idl_array.test(); | 98 idl_array.test(); |
| 91 </script> | 99 </script> |
| 92 | 100 |
| OLD | NEW |