summaryrefslogtreecommitdiffstats
path: root/dom/push/test/xpcshell/broadcast_handler.sys.mjs
blob: 2a41aa42420c9fa3bf86740ca8f0825e94ed15bd (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));
      };
    });
  },
};