summaryrefslogtreecommitdiffstats
path: root/dom/payments/test/GeneralChromeScript.js
blob: e98f3d37f1c51f16ad4b4571454418609f9719f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";

const { XPCOMUtils } = ChromeUtils.import(
  "resource://gre/modules/XPCOMUtils.jsm"
);

const paymentSrv = Cc[
  "@mozilla.org/dom/payments/payment-request-service;1"
].getService(Ci.nsIPaymentRequestService);

addMessageListener("teardown", function() {
  paymentSrv.setTestingUIService(null);
  sendAsyncMessage("teardown-complete");
});