summaryrefslogtreecommitdiffstats
path: root/dom/push/test/xpcshell/broadcast_handler.sys.mjs
blob: f1f5a0fa89e91d4cc58c05232cb9edb46f5011ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export var broadcastHandler = {
  reset() {
    this.notifications = [];

    this.wasNotified = new Promise(resolve => {
      this.receivedBroadcastMessage = function () {
        resolve();
        this.notifications.push(Array.from(arguments));
      };
    });
  },
};