function simulateErrorEvent(channel, error) {
  assertNotNull(channel.getHandler());
  channel.getHandler().channelError(channel, error);
}
Simulates the WebChannelBase firing the error event for the given channel.
@param {!WebChannelBase} channel The WebChannelBase.
@param {!WebChannelBase.Error} error