mirror of
https://github.com/servo/servo.git
synced 2025-09-02 19:18:23 +01:00
Update web-platform-tests to revision ea3cae9746c39e8192b91181044144c60d9388e8
This commit is contained in:
parent
9513544e91
commit
b3f94b4330
194 changed files with 22476 additions and 15435 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue