[w3c/payment-request] Consider specifying a testing IDL for a mock payment UI (#799)

WebKit has converted some of the manual payment-request tests into automated tests by creating a mock payment UI in our testing harness that can be scripted from the test. Here's what the IDL looks like right now:

```
interface MockPaymentCoordinator {
    void setShippingAddress(MockPaymentAddress shippingAddress);
    void changeShippingOption(DOMString shippingOption);
    void changePaymentMethod(ApplePayPaymentMethod paymentMethod);
    void acceptPayment();
    void cancelPayment();

    readonly attribute ApplePayLineItem total;
    readonly attribute sequence<ApplePayLineItem> lineItems;
    readonly attribute sequence<MockPaymentError> errors;
};
```

This is specific to Apple Pay right now, and is missing some stuff, so obviously this wouldn't be used as-is.

But maybe we could specify something like this so that (a) the WebKit-specific tests could be upstreamed to WPT, and (b) other browsers could run them.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/799

Received on Wednesday, 24 October 2018 12:41:48 UTC