B2G/gecko/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
/**
 * Checks to see if a preference exists for the given URI.
 *
 * @param aURI
 *        The URI to check if a preference exists.
 * @param aExists
 *        True if the permission should exist, false otherwise.
 */
Checks to see if a preference exists for the given URI.
@param aURI
The URI to check if a preference exists.
@param aExists
True if the permission should exist, false otherwise.
Checks to see if a preference exists for the given URI . @param aURI The URI to check if a preference exists . @param aExists True if the permission should exist false otherwise .
function check_preference_exists(aURI, aExists)
{
  let cp = Cc["@mozilla.org/content-pref/service;1"].
           getService(Ci.nsIContentPrefService);
  let checker = aExists ? do_check_true : do_check_false;
  checker(cp.hasPref(aURI, PREFERENCE_NAME));
}
function check_preference_exists ( aURI , aExists ) { let cp = Cc [ "@mozilla.org/content-pref/service;1" ] . getService ( Ci . nsIContentPrefService ) ; let checker = aExists ? do_check_true : do_check_false ; checker ( cp . hasPref ( aURI , PREFERENCE_NAME ) ) ; }
Checks to see if a preference exists for the given URI.
Checks to see if a preference exists for the given URI .