summaryrefslogtreecommitdiffstats
path: root/netwerk/test/mochitests/file_chromecommon.js
blob: 986a9d7ef150be6d0e7caa618f8b760ff3f8050f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* eslint-env mozilla/chrome-script */

"use strict";

// eslint-disable-next-line mozilla/use-services
let cs = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);

addMessageListener("getCookieCountAndClear", () => {
  let count = cs.cookies.length;
  cs.removeAll();

  sendAsyncMessage("getCookieCountAndClear:return", { count });
});

cs.removeAll();