B2G/gecko/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
/**
 * Add a cookie to the cookie service.
 *
 * @param aDomain
 */
Add a cookie to the cookie service.
@param aDomain
Add a cookie to the cookie service . @param aDomain
function add_cookie(aDomain)
{
  check_cookie_exists(aDomain, false);
  let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
  cm.add(aDomain, COOKIE_PATH, COOKIE_NAME, "", false, false, false,
         COOKIE_EXPIRY);
  check_cookie_exists(aDomain, true);
}
function add_cookie ( aDomain ) { check_cookie_exists ( aDomain , false ) ; let cm = Cc [ "@mozilla.org/cookiemanager;1" ] . getService ( Ci . nsICookieManager2 ) ; cm . add ( aDomain , COOKIE_PATH , COOKIE_NAME , "" , false , false , false , COOKIE_EXPIRY ) ; check_cookie_exists ( aDomain , true ) ; }
Add a cookie to the cookie service.
Add a cookie to the cookie service .