createFakeRegularXHR = function(xhrText, isMultipart) {
    var fakeXHR = {
      responseText: xhrText,
      getResponseHeader: function(h) {
        return (h == 'X-SPF-Response-Type' && isMultipart) ? 'multipart' : '';
      }
    };
    var callOnHeaders = function(opts) {
      opts.onHeaders(fakeXHR);
    };
    var callOnDoneDelayed = function(opts) {
      setTimeout(function() {
        opts.onDone(fakeXHR);
      }, MOCK_DELAY);
    };
    return function(xhrUrl, xhrOptions) {
      callOnHeaders(xhrOptions);
      callOnDoneDelayed(xhrOptions);
    };
  }
@fileoverview Tests for navigation-related request functions.