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

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