B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Tests if a given guid is valid for use in Places or not.
 *
 * @param aGuid
 *        The guid to test.
 * @param [optional] aStack
 *        The stack frame used to report the error.
 */
Tests if a given guid is valid for use in Places or not.
@param aGuid
The guid to test.
@param [optional] aStack
The stack frame used to report the error.
Tests if a given guid is valid for use in Places or not . @param aGuid The guid to test . @param [ optional ] aStack The stack frame used to report the error .
function do_check_valid_places_guid(aGuid,
                                    aStack)
{
  if (!aStack) {
    aStack = Components.stack.caller;
  }
  do_check_true(/^[a-zA-Z0-9\-_]{12}$/.test(aGuid), aStack);
}
function do_check_valid_places_guid ( aGuid , aStack ) { if ( ! aStack ) { aStack = Components . stack . caller ; } do_check_true ( / ^[a-zA-Z0-9\-_]{12}$ / . test ( aGuid ) , aStack ) ; }
Tests if a given guid is valid for use in Places or not.
Tests if a given guid is valid for use in Places or not .