summaryrefslogtreecommitdiffstats
path: root/dom/push/test/xpcshell/broadcast_handler.jsm
blob: eb9f3625ebdf6cd2d47c6d816001ff7882f42dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";

var EXPORTED_SYMBOLS = ["broadcastHandler"];

var broadcastHandler = {
  reset() {
    this.notifications = [];

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