Update web-platform-tests to revision ea3cae9746c39e8192b91181044144c60d9388e8

This commit is contained in:
WPT Sync Bot 2019-03-12 21:33:06 -04:00
parent 9513544e91
commit b3f94b4330
194 changed files with 22476 additions and 15435 deletions

View file

@ -12,43 +12,6 @@ setup({
allow_uncaught_exception: true,
});
const defaultMethods = Object.freeze([
{ supportedMethods: "basic-card" },
{
supportedMethods: "https://apple.com/apple-pay",
data: {
version: 3,
merchantIdentifier: "merchant.com.example",
countryCode: "US",
merchantCapabilities: ["supports3DS"],
supportedNetworks: ["visa"],
}
},
]);
const defaultDetails = Object.freeze({
id: "fail",
total: {
label: "Total",
amount: {
currency: "USD",
value: "1.00",
},
},
});
test(() => {
assert_throws(
"SecurityError",
() => {
const request = new PaymentRequest(defaultMethods, defaultDetails);
request.show(); // <--- should throw here
request.abort();
},
"throws a SecurityError if not triggered by user activation"
);
});
async function runUserActivation(button) {
button.disabled = true;
const { contentWindow: iframeWindow } = document.getElementById("iframe");