mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -7,8 +7,7 @@
|
|||
interface PaymentRequest : EventTarget {
|
||||
constructor(
|
||||
sequence<PaymentMethodData> methodData,
|
||||
PaymentDetailsInit details,
|
||||
optional PaymentOptions options = {}
|
||||
PaymentDetailsInit details
|
||||
);
|
||||
[NewObject]
|
||||
Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise);
|
||||
|
@ -18,12 +17,7 @@ interface PaymentRequest : EventTarget {
|
|||
Promise<boolean> canMakePayment();
|
||||
|
||||
readonly attribute DOMString id;
|
||||
readonly attribute PaymentAddress? shippingAddress;
|
||||
readonly attribute DOMString? shippingOption;
|
||||
readonly attribute PaymentShippingType? shippingType;
|
||||
|
||||
attribute EventHandler onshippingaddresschange;
|
||||
attribute EventHandler onshippingoptionchange;
|
||||
attribute EventHandler onpaymentmethodchange;
|
||||
};
|
||||
|
||||
|
@ -39,7 +33,6 @@ dictionary PaymentCurrencyAmount {
|
|||
|
||||
dictionary PaymentDetailsBase {
|
||||
sequence<PaymentItem> displayItems;
|
||||
sequence<PaymentShippingOption> shippingOptions;
|
||||
sequence<PaymentDetailsModifier> modifiers;
|
||||
};
|
||||
|
||||
|
@ -49,10 +42,7 @@ dictionary PaymentDetailsInit : PaymentDetailsBase {
|
|||
};
|
||||
|
||||
dictionary PaymentDetailsUpdate : PaymentDetailsBase {
|
||||
DOMString error;
|
||||
PaymentItem total;
|
||||
AddressErrors shippingAddressErrors;
|
||||
PayerErrors payerErrors;
|
||||
object paymentMethodErrors;
|
||||
};
|
||||
|
||||
|
@ -63,75 +53,12 @@ dictionary PaymentDetailsModifier {
|
|||
object data;
|
||||
};
|
||||
|
||||
enum PaymentShippingType {
|
||||
"shipping",
|
||||
"delivery",
|
||||
"pickup"
|
||||
};
|
||||
|
||||
dictionary PaymentOptions {
|
||||
boolean requestPayerName = false;
|
||||
boolean requestBillingAddress = false;
|
||||
boolean requestPayerEmail = false;
|
||||
boolean requestPayerPhone = false;
|
||||
boolean requestShipping = false;
|
||||
PaymentShippingType shippingType = "shipping";
|
||||
};
|
||||
|
||||
dictionary PaymentItem {
|
||||
required DOMString label;
|
||||
required PaymentCurrencyAmount amount;
|
||||
boolean pending = false;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=(Window)]
|
||||
interface PaymentAddress {
|
||||
[Default] object toJSON();
|
||||
readonly attribute DOMString city;
|
||||
readonly attribute DOMString country;
|
||||
readonly attribute DOMString dependentLocality;
|
||||
readonly attribute DOMString organization;
|
||||
readonly attribute DOMString phone;
|
||||
readonly attribute DOMString postalCode;
|
||||
readonly attribute DOMString recipient;
|
||||
readonly attribute DOMString region;
|
||||
readonly attribute DOMString sortingCode;
|
||||
readonly attribute FrozenArray<DOMString> addressLine;
|
||||
};
|
||||
|
||||
dictionary AddressInit {
|
||||
DOMString country = "";
|
||||
sequence<DOMString> addressLine = [];
|
||||
DOMString region = "";
|
||||
DOMString city = "";
|
||||
DOMString dependentLocality = "";
|
||||
DOMString postalCode = "";
|
||||
DOMString sortingCode = "";
|
||||
DOMString organization = "";
|
||||
DOMString recipient = "";
|
||||
DOMString phone = "";
|
||||
};
|
||||
|
||||
dictionary AddressErrors {
|
||||
DOMString addressLine;
|
||||
DOMString city;
|
||||
DOMString country;
|
||||
DOMString dependentLocality;
|
||||
DOMString organization;
|
||||
DOMString phone;
|
||||
DOMString postalCode;
|
||||
DOMString recipient;
|
||||
DOMString region;
|
||||
DOMString sortingCode;
|
||||
};
|
||||
|
||||
dictionary PaymentShippingOption {
|
||||
required DOMString id;
|
||||
required DOMString label;
|
||||
required PaymentCurrencyAmount amount;
|
||||
boolean selected = false;
|
||||
};
|
||||
|
||||
enum PaymentComplete {
|
||||
"fail",
|
||||
"success",
|
||||
|
@ -145,33 +72,18 @@ interface PaymentResponse : EventTarget {
|
|||
readonly attribute DOMString requestId;
|
||||
readonly attribute DOMString methodName;
|
||||
readonly attribute object details;
|
||||
readonly attribute PaymentAddress? shippingAddress;
|
||||
readonly attribute DOMString? shippingOption;
|
||||
readonly attribute DOMString? payerName;
|
||||
readonly attribute DOMString? payerEmail;
|
||||
readonly attribute DOMString? payerPhone;
|
||||
|
||||
[NewObject]
|
||||
Promise<undefined> complete(optional PaymentComplete result = "unknown");
|
||||
[NewObject]
|
||||
Promise<undefined> retry(optional PaymentValidationErrors errorFields = {});
|
||||
|
||||
attribute EventHandler onpayerdetailchange;
|
||||
};
|
||||
|
||||
dictionary PaymentValidationErrors {
|
||||
PayerErrors payer;
|
||||
AddressErrors shippingAddress;
|
||||
DOMString error;
|
||||
object paymentMethod;
|
||||
};
|
||||
|
||||
dictionary PayerErrors {
|
||||
DOMString email;
|
||||
DOMString name;
|
||||
DOMString phone;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=Window]
|
||||
interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
|
||||
constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict = {});
|
||||
|
@ -191,3 +103,31 @@ interface PaymentRequestUpdateEvent : Event {
|
|||
};
|
||||
|
||||
dictionary PaymentRequestUpdateEventInit : EventInit {};
|
||||
|
||||
[SecureContext, Exposed=(Window)]
|
||||
interface PaymentAddress {
|
||||
[Default] object toJSON();
|
||||
readonly attribute DOMString city;
|
||||
readonly attribute DOMString country;
|
||||
readonly attribute DOMString dependentLocality;
|
||||
readonly attribute DOMString organization;
|
||||
readonly attribute DOMString phone;
|
||||
readonly attribute DOMString postalCode;
|
||||
readonly attribute DOMString recipient;
|
||||
readonly attribute DOMString region;
|
||||
readonly attribute DOMString sortingCode;
|
||||
readonly attribute FrozenArray<DOMString> addressLine;
|
||||
};
|
||||
|
||||
dictionary AddressErrors {
|
||||
DOMString addressLine;
|
||||
DOMString city;
|
||||
DOMString country;
|
||||
DOMString dependentLocality;
|
||||
DOMString organization;
|
||||
DOMString phone;
|
||||
DOMString postalCode;
|
||||
DOMString recipient;
|
||||
DOMString region;
|
||||
DOMString sortingCode;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue