mirror of
https://github.com/servo/servo.git
synced 2025-09-13 08:28:19 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/resources/WebIDLParser.js></script>
|
||||
<script src=/resources/idlharness.js></script>
|
||||
<script type="text/plain" id="untested">
|
||||
dictionary CredentialData {
|
||||
USVString id;
|
||||
};
|
||||
|
||||
[Exposed=Window, SecureContext]
|
||||
interface Credential {
|
||||
readonly attribute USVString id;
|
||||
readonly attribute DOMString type;
|
||||
};
|
||||
|
||||
[NoInterfaceObject, SecureContext]
|
||||
interface CredentialUserData {
|
||||
readonly attribute USVString name;
|
||||
readonly attribute USVString iconURL;
|
||||
};
|
||||
|
||||
dictionary PasswordCredentialData : CredentialData {
|
||||
USVString name;
|
||||
USVString iconURL;
|
||||
required USVString password;
|
||||
};
|
||||
|
||||
typedef (PasswordCredentialData or HTMLFormElement) PasswordCredentialInit;
|
||||
|
||||
typedef (FormData or URLSearchParams) CredentialBodyType;
|
||||
|
||||
|
||||
dictionary FederatedCredentialInit : CredentialData {
|
||||
USVString name;
|
||||
USVString iconURL;
|
||||
required USVString provider;
|
||||
DOMString protocol;
|
||||
};
|
||||
|
||||
dictionary CredentialCreationOptions {
|
||||
PasswordCredentialInit? password;
|
||||
FederatedCredentialInit? federated;
|
||||
};
|
||||
|
||||
enum CredentialMediationRequirement {
|
||||
"silent",
|
||||
"optional",
|
||||
"required"
|
||||
};
|
||||
|
||||
dictionary CredentialRequestOptions {
|
||||
boolean password = false;
|
||||
FederatedCredentialRequestOptions federated;
|
||||
|
||||
CredentialMediationRequirement mediation = "optional";
|
||||
};
|
||||
|
||||
dictionary FederatedCredentialRequestOptions {
|
||||
sequence<USVString> providers;
|
||||
sequence<DOMString> protocols;
|
||||
};
|
||||
|
||||
</script>
|
||||
<script type="text/plain" id="tested">
|
||||
[Exposed=Window, SecureContext]
|
||||
interface CredentialsContainer {
|
||||
Promise<Credential> get(optional CredentialRequestOptions options);
|
||||
Promise<Credential> store(Credential credential);
|
||||
Promise<Credential?> create(optional CredentialCreationOptions options);
|
||||
Promise<void> preventSilentAccess();
|
||||
};
|
||||
|
||||
[Constructor(PasswordCredentialData data),
|
||||
Constructor(HTMLFormElement form),
|
||||
Exposed=Window,
|
||||
SecureContext]
|
||||
interface PasswordCredential : Credential {
|
||||
readonly attribute DOMString password;
|
||||
};
|
||||
PasswordCredential implements CredentialUserData;
|
||||
|
||||
[Constructor(FederatedCredentialInit data),
|
||||
Exposed=Window,
|
||||
SecureContext]
|
||||
interface FederatedCredential : Credential {
|
||||
readonly attribute USVString provider;
|
||||
readonly attribute DOMString? protocol;
|
||||
};
|
||||
FederatedCredential implements CredentialUserData;
|
||||
</script>
|
||||
<script>
|
||||
"use strict";
|
||||
var idl_array = new IdlArray();
|
||||
idl_array.add_untested_idls(document.querySelector('#untested').textContent);
|
||||
idl_array.add_idls(document.querySelector('#tested').textContent);
|
||||
idl_array.add_objects({
|
||||
CredentialsContainer: ['navigator.credentials'],
|
||||
PasswordCredential: ['new PasswordCredential({ id: "id", password: "pencil", iconURL: "https://example.com/", name: "name" })'],
|
||||
FederatedCredential: ['new FederatedCredential({ id: "id", provider: "https://example.com", iconURL: "https://example.com/", name: "name" })']
|
||||
});
|
||||
idl_array.test();
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue