B2G/gecko/toolkit/mozapps/update/test/chrome/utils.js
/**
 * Compares the return value of prefHasUserValue for the preference specified in
 * gPrefToCheck with the value passed in the aPrefHasValue parameter or the
 * value specified in the current test's prefHasUserValue property if
 * aPrefHasValue is undefined.
 *
 * @param  aPrefHasValue (optional)
 *         The expected value returned from prefHasUserValue for the preference
 *         specified in gPrefToCheck. If aPrefHasValue is undefined the value
 *         of the current test's prefHasUserValue property will be used.
 */
Compares the return value of prefHasUserValue for the preference specified in
gPrefToCheck with the value passed in the aPrefHasValue parameter or the
value specified in the current test's prefHasUserValue property if
aPrefHasValue is undefined.

@param  aPrefHasValue (optional)
The expected value returned from prefHasUserValue for the preference
specified in gPrefToCheck. If aPrefHasValue is undefined the value
of the current test's prefHasUserValue property will be used.
Compares the return value of prefHasUserValue for the preference specified in gPrefToCheck with the value passed in the aPrefHasValue parameter or the value specified in the current test ' s prefHasUserValue property if aPrefHasValue is undefined . @param aPrefHasValue ( optional ) The expected value returned from prefHasUserValue for the preference specified in gPrefToCheck . If aPrefHasValue is undefined the value of the current test ' s prefHasUserValue property will be used .
function checkPrefHasUserValue(aPrefHasValue) {
  let prefHasUserValue = aPrefHasValue === undefined ? gTest.prefHasUserValue
                                                     : aPrefHasValue;
  is(Services.prefs.prefHasUserValue(gPrefToCheck), prefHasUserValue,
     "Checking prefHasUserValue for preference " + gPrefToCheck + " equals " +
     (prefHasUserValue ? "true" : "false"));
}
function checkPrefHasUserValue ( aPrefHasValue ) { let prefHasUserValue = aPrefHasValue === undefined ? gTest . prefHasUserValue : aPrefHasValue ; is ( Services . prefs . prefHasUserValue ( gPrefToCheck ) , prefHasUserValue , "Checking prefHasUserValue for preference " + gPrefToCheck + " equals " + ( prefHasUserValue ? "true" : "false" ) ) ; }
Compares the return value of prefHasUserValue for the preference specified in
 gPrefToCheck with the value passed in the aPrefHasValue parameter or the
 value specified in the current test's prefHasUserValue property if
 aPrefHasValue is undefined.
Compares the return value of prefHasUserValue for the preference specified in gPrefToCheck with the value passed in the aPrefHasValue parameter or the value specified in the current test ' s prefHasUserValue property if aPrefHasValue is undefined .