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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/credential-management/idl.https.html

Issue 2844453002: Update CM API IDL to use SecureContext (Closed)
Patch Set: Rebase 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
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 interface Credential { 12 interface Credential {
12 readonly attribute USVString id; 13 readonly attribute USVString id;
13 readonly attribute DOMString type; 14 readonly attribute DOMString type;
14 }; 15 };
15 16
16 dictionary SiteBoundCredentialData : CredentialData { 17 dictionary SiteBoundCredentialData : CredentialData {
17 USVString name; 18 USVString name;
18 USVString iconURL; 19 USVString iconURL;
19 }; 20 };
20 21
21 [ 22 [NoInterfaceObject, SecureContext]
22 NoInterfaceObject, 23 interface CredentialUserData {
23 SecureContext
24 ] interface CredentialUserData {
25 readonly attribute USVString name; 24 readonly attribute USVString name;
26 readonly attribute USVString iconURL; 25 readonly attribute USVString iconURL;
27 }; 26 };
28 27
29 dictionary PasswordCredentialData : SiteBoundCredentialData { 28 dictionary PasswordCredentialData : SiteBoundCredentialData {
30 USVString password; 29 USVString password;
31 }; 30 };
32 31
33 typedef (FormData or URLSearchParams) CredentialBodyType; 32 typedef (FormData or URLSearchParams) CredentialBodyType;
34 33
(...skipping 18 matching lines...) Expand all
53 </script> 52 </script>
54 <script type="text/plain" id="tested"> 53 <script type="text/plain" id="tested">
55 interface CredentialsContainer { 54 interface CredentialsContainer {
56 Promise<Credential> get(optional CredentialRequestOptions options); 55 Promise<Credential> get(optional CredentialRequestOptions options);
57 Promise<Credential> store(Credential credential); 56 Promise<Credential> store(Credential credential);
58 Promise<void> requireUserMediation(); 57 Promise<void> requireUserMediation();
59 }; 58 };
60 59
61 [Constructor(PasswordCredentialData data), 60 [Constructor(PasswordCredentialData data),
62 Constructor(HTMLFormElement form), 61 Constructor(HTMLFormElement form),
63 Exposed=Window] 62 Exposed=Window,
63 SecureContext]
64 interface PasswordCredential : Credential { 64 interface PasswordCredential : Credential {
65 attribute USVString idName; 65 attribute USVString idName;
66 attribute USVString passwordName; 66 attribute USVString passwordName;
67 67
68 attribute CredentialBodyType? additionalData; 68 attribute CredentialBodyType? additionalData;
69 }; 69 };
70 PasswordCredential implements CredentialUserData; 70 PasswordCredential implements CredentialUserData;
71 71
72 [Constructor(FederatedCredentialData data), Exposed=Window] 72 [Constructor(FederatedCredentialData data),
73 Exposed=Window,
74 SecureContext]
73 interface FederatedCredential : Credential { 75 interface FederatedCredential : Credential {
74 readonly attribute USVString provider; 76 readonly attribute USVString provider;
75 readonly attribute DOMString? protocol; 77 readonly attribute DOMString? protocol;
76 }; 78 };
77 FederatedCredential implements CredentialUserData; 79 FederatedCredential implements CredentialUserData;
78 </script> 80 </script>
79 <script> 81 <script>
80 "use strict"; 82 "use strict";
81 var idl_array = new IdlArray(); 83 var idl_array = new IdlArray();
82 idl_array.add_untested_idls(document.querySelector('#untested').textContent) ; 84 idl_array.add_untested_idls(document.querySelector('#untested').textContent) ;
83 idl_array.add_idls(document.querySelector('#tested').textContent); 85 idl_array.add_idls(document.querySelector('#tested').textContent);
84 idl_array.add_objects({ 86 idl_array.add_objects({
85 CredentialsContainer: ['navigator.credentials'], 87 CredentialsContainer: ['navigator.credentials'],
86 PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil ", iconURL: "https://example.com/", name: "name" })'], 88 PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil ", iconURL: "https://example.com/", name: "name" })'],
87 FederatedCredential: ['new FederatedCredential({ id: "id", provider: "http s://example.com", iconURL: "https://example.com/", name: "name" })'] 89 FederatedCredential: ['new FederatedCredential({ id: "id", provider: "http s://example.com", iconURL: "https://example.com/", name: "name" })']
88 }); 90 });
89 idl_array.test(); 91 idl_array.test();
90 </script> 92 </script>
91 93
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698