mirror of
https://github.com/servo/servo
synced 2026-05-12 18:06:32 +02:00
23 lines
810 B
HTML
23 lines
810 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>Test for PaymentMethodChangeEvent.methodDetails attribute</title>
|
|
<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-paymentmethodchangeevent-methoddetails">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
"use strict";
|
|
test(() => {
|
|
const methodDetails = {
|
|
test: "pass"
|
|
}
|
|
const event = new PaymentMethodChangeEvent("test", {
|
|
methodName: "wpt-test",
|
|
methodDetails
|
|
});
|
|
assert_idl_attribute(event, "methodDetails");
|
|
const { test } = event.methodDetails;
|
|
assert_equals(test, "pass");
|
|
assert_equals(event.methodDetails, methodDetails);
|
|
}, "Must have a methodDetails IDL attribute, which is initialized with to the methodName dictionary value");
|
|
</script>
|