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