Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/idl.html

Issue 2832813002: Drop SiteBoundCredential in favor of CredentialUserData (Closed)
Patch Set: HTTPS Rename Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src=/resources/testharness.js></script>
3 <script src=/resources/testharnessreport.js></script>
4 <script src=/w3c/resources/WebIDLParser.js></script>
5 <script src=/w3c/resources/idlharness.js></script>
6 <script type="text/plain" id="untested">
7 dictionary CredentialData {
8 USVString id;
9 };
10
11 interface Credential {
12 readonly attribute USVString id;
13 readonly attribute DOMString type;
14 };
15
16 dictionary SiteBoundCredentialData : CredentialData {
17 USVString name;
18 USVString iconURL;
19 };
20
21 interface SiteBoundCredential : Credential {
22 readonly attribute USVString name;
23 readonly attribute USVString iconURL;
24 };
25
26 dictionary PasswordCredentialData : SiteBoundCredentialData {
27 USVString password;
28 };
29
30 typedef (FormData or URLSearchParams) CredentialBodyType;
31
32
33 dictionary FederatedCredentialData : SiteBoundCredentialData {
34 USVString provider;
35 DOMString protocol;
36 };
37
38 dictionary CredentialRequestOptions {
39 boolean password = false;
40 FederatedCredentialRequestOptions federated;
41
42 boolean unmediated = false;
43 };
44
45 dictionary FederatedCredentialRequestOptions {
46 sequence<USVString> providers;
47 sequence<DOMString> protocols;
48 };
49
50 </script>
51 <script type="text/plain" id="tested">
52 interface CredentialsContainer {
53 Promise<Credential> get(optional CredentialRequestOptions options);
54 Promise<Credential> store(Credential credential);
55 Promise<void> requireUserMediation();
56 };
57
58 [Constructor(PasswordCredentialData data),
59 Constructor(HTMLFormElement form),
60 Exposed=Window]
61 interface PasswordCredential : SiteBoundCredential {
62 attribute USVString idName;
63 attribute USVString passwordName;
64
65 attribute CredentialBodyType? additionalData;
66 };
67
68 [Constructor(FederatedCredentialData data), Exposed=Window]
69 interface FederatedCredential : SiteBoundCredential {
70 readonly attribute USVString provider;
71 readonly attribute DOMString? protocol;
72 };
73 </script>
74 <script>
75 "use strict";
76 var idl_array = new IdlArray();
77 idl_array.add_untested_idls(document.querySelector('#untested').textContent) ;
78 idl_array.add_idls(document.querySelector('#tested').textContent);
79 idl_array.add_objects({
80 CredentialsContainer: ['navigator.credentials'],
81 PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil ", iconURL: "https://example.com/", name: "name" })'],
82 FederatedCredential: ['new FederatedCredential({ id: "id", provider: "http s://example.com", iconURL: "https://example.com/", name: "name" })']
83 });
84 idl_array.test();
85 </script>
86
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698