B2G/gecko/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
/**
 * Checks to see if a login exists for a host.
 *
 * @param aHost
 *        The host to check for the test login.
 * @param aExists
 *        True if the login should exist, false otherwise.
 */
Checks to see if a login exists for a host.
@param aHost
The host to check for the test login.
@param aExists
True if the login should exist, false otherwise.
Checks to see if a login exists for a host . @param aHost The host to check for the test login . @param aExists True if the login should exist false otherwise .
function check_login_exists(aHost, aExists)
{
  let lm = Cc["@mozilla.org/login-manager;1"].
           getService(Ci.nsILoginManager);
  let count = { value: 0 };
  lm.findLogins(count, aHost, "", null);
  do_check_eq(count.value, aExists ? 1 : 0);
}
function check_login_exists ( aHost , aExists ) { let lm = Cc [ "@mozilla.org/login-manager;1" ] . getService ( Ci . nsILoginManager ) ; let count = { value : 0 } ; lm . findLogins ( count , aHost , "" , null ) ; do_check_eq ( count . value , aExists ? 1 : 0 ) ; }
Checks to see if a login exists for a host.
Checks to see if a login exists for a host .