| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>Test for PaymentMethodChangeEvent.methodName attribute</title> |
| <link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-paymentmethodchangeevent-src"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script> |
| "use strict"; |
| test(() => { |
| const event = new PaymentMethodChangeEvent("test", { |
| methodName: "wpt-test", |
| }); |
| assert_idl_attribute(event, "methodName"); |
| const { methodName } = event; |
| assert_equals(methodName, "wpt-test"); |
| }, "Must have a methodName IDL attribute, which is initialized with to the methodName dictionary value"); |