B2G/gecko/dom/browser-element/mochitest/browserElementTestHelpers.js
/**
 * Returns a promise rejected with a given `reason`. Optionally a second
 * `prototype` argument may be provided to be used as a prototype for the
 * returned promise.
 */
Returns a promise rejected with a given `reason`. Optionally a second
`prototype` argument may be provided to be used as a prototype for the
returned promise.
Returns a promise rejected with a given ` reason ` . Optionally a second ` prototype ` argument may be provided to be used as a prototype for the returned promise .
function reject(reason, prototype) {
  var deferred = defer(prototype);
  deferred.reject(reason);
  return deferred.promise;
}
function reject ( reason , prototype ) { var deferred = defer ( prototype ) ; deferred . reject ( reason ) ; return deferred . promise ; }
Returns a promise rejected with a given `reason`.
Returns a promise rejected with a given ` reason ` .