B2G/gecko/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
/**
 * Adds a login for the specified host to the login manager.
 *
 * @param aHost
 *        The host to add the login for.
 */
Adds a login for the specified host to the login manager.
@param aHost
The host to add the login for.
Adds a login for the specified host to the login manager . @param aHost The host to add the login for .
function add_login(aHost)
{
  check_login_exists(aHost, false);
  let login = Cc["@mozilla.org/login-manager/loginInfo;1"].
              createInstance(Ci.nsILoginInfo);
  login.init(aHost, "", null, LOGIN_USERNAME, LOGIN_PASSWORD,
             LOGIN_USERNAME_FIELD, LOGIN_PASSWORD_FIELD);
  let lm = Cc["@mozilla.org/login-manager;1"].
           getService(Ci.nsILoginManager);
  lm.addLogin(login);
  check_login_exists(aHost, true);
}
function add_login ( aHost ) { check_login_exists ( aHost , false ) ; let login = Cc [ "@mozilla.org/login-manager/loginInfo;1" ] . createInstance ( Ci . nsILoginInfo ) ; login . init ( aHost , "" , null , LOGIN_USERNAME , LOGIN_PASSWORD , LOGIN_USERNAME_FIELD , LOGIN_PASSWORD_FIELD ) ; let lm = Cc [ "@mozilla.org/login-manager;1" ] . getService ( Ci . nsILoginManager ) ; lm . addLogin ( login ) ; check_login_exists ( aHost , true ) ; }
Adds a login for the specified host to the login manager.
Adds a login for the specified host to the login manager .