testErrorRequest() {
    // Firefox and Safari do not give a valid error event.
    if (userAgent.GECKO || product.SAFARI) {
      return;
    }

    return new GoogPromise((resolve, reject) => {
             CrossDomainRpc.send(
                 'http://hoodjimcwaadji.google.com/index.html', resolve, 'POST',
                 {xyz: '01234567891123456789'});
             setTimeout(() => {
               reject('CrossDomainRpc.send did not complete within 4000ms');
             }, 4000);
           })
        .then(/**
                 @suppress {visibility} suppression added to enable type
                 checking
               */
              (e) => {
                if (e.target.status < 300) {
                  fail('should have failed requesting a non-existent URI');
                } else {
                  log.fine(
                      CrossDomainRpc.logger_,
                      'expected error seen; event=' + print(e));
                }
              });
  }
@suppress {visibility,strictMissingProperties,checkTypes}
                 suppression added to enable type checking