summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/merchant-validation/complete-method.tentative.https.html
blob: 36bfdb2160a7c7f71a64ecec07024b700bb1de60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-merchantvalidationevent-complete">
<title>Test for the MerchantValidationEvent's complete() method.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(() => {
  const event = new MerchantValidationEvent("test");
  assert_throws_dom("InvalidStateError", () => {
    event.complete("");
  })
}, "If event's isTrusted attribute is false, then then throw an InvalidStateError DOMException.");
</script>