B2G/gecko/testing/marionette/marionette-listener.js
/**
 * Delete all the visibile cookies on a page
 */
Delete all the visibile cookies on a page
Delete all the visibile cookies on a page
function deleteAllCookies(msg) {
  let cookieManager = Cc['@mozilla.org/cookiemanager;1'].
                        getService(Ci.nsICookieManager);
  let cookies = getVisibleCookies(curWindow.location);
  for (let i = 0; i < cookies.length; i++) {
    let cookie = cookies[i];
    cookieManager.remove(cookie.host, cookie.name, cookie.path, false);
  }
  sendOk(msg.json.command_id);
}
function deleteAllCookies ( msg ) { let cookieManager = Cc [ '@mozilla.org/cookiemanager;1' ] . getService ( Ci . nsICookieManager ) ; let cookies = getVisibleCookies ( curWindow . location ) ; for ( let i = 0 ; i < cookies . length ; i ++ ) { let cookie = cookies [ i ] ; cookieManager . remove ( cookie . host , cookie . name , cookie . path , false ) ; } sendOk ( msg . json . command_id ) ; }
Delete all the visibile cookies on a page
Delete all the visibile cookies on a page