function createMockEvent(origin, data) {
  const event = {};
  event.getBrowserEvent = () => ({origin: origin, data: data});
  return event;
}
Creates a Mock Event object used to test browser events.
@param {string} origin The URI origin, or '*', of the event.
@param {string} data The data to associate with the event.
@return {!Object} The created object representing a browser event.