testBadOriginTriggersOnErrorHandler() {
    // TODO: b/296631792 - xhr.get below consistently hangs.
    if (product.SAFARI) return;

    if (userAgent.EDGE) return;  // failing b/62677027

    return xhr.get('http://www.google.com')
        .then(
            function() {
              fail(
                  'XHR to http://www.google.com should\'ve failed due to ' +
                  'same-origin policy.');
            } /* opt_onFulfilled */,
            /**
               @suppress {strictMissingProperties} suppression added to enable
               type checking
             */
            function(err) {
              // In IE this will be a goog.labs.net.xhr.Error since it is thrown
              //  when calling xhr.open(), other browsers will raise an
              //  HttpError.
              assertTrue(
                  'Error should be an xhr error', err instanceof xhr.Error);
              assertNotNull(err.xhr);
            });
  }
@suppress {strictMissingProperties} suppression added to
                    enable type checking