B2G/gecko/toolkit/components/places/tests/unit/test_async_history_api.js
/**
 * Default callback handler throws when success is unexpected.
 *
 * @param handleErrorFunc
 *        The error handling function
 */
Default callback handler throws when success is unexpected.
@param handleErrorFunc
The error handling function
Default callback handler throws when success is unexpected . @param handleErrorFunc The error handling function
function expectHandleError(handleErrorFunc)
{
  return {
    handleError: handleErrorFunc,
    handleResult: function handleResult(aPlaceInfo) {
      do_throw("Unexpected success.");
    }
  };
}
function expectHandleError ( handleErrorFunc ) { return { handleError : handleErrorFunc , handleResult : function handleResult ( aPlaceInfo ) { do_throw ( "Unexpected success." ) ; } } ; }
Default callback handler throws when success is unexpected.
Default callback handler throws when success is unexpected .