5 var cm
= Services
.cookies
;
6 Assert
.notEqual(cm
, null, "Retrieving the cookie manager failed");
8 const time
= new Date("Jan 1, 2030").getTime() / 1000;
19 Ci
.nsICookie
.SAMESITE_NONE
,
20 Ci
.nsICookie
.SCHEME_HTTPS
22 const now
= Math
.floor(new Date().getTime() / 1000);
25 for (let cookie
of cm
.cookies
) {
27 cookie
.host
== "example.com" &&
32 "creationTime" in cookie
,
33 "creationTime attribute is not accessible on the cookie"
35 var creationTime
= Math
.floor(cookie
.creationTime
/ 1000000);
36 // allow the times to slip by one second at most,
37 // which should be fine under normal circumstances.
39 Math
.abs(creationTime
- now
) <= 1,
40 "Cookie's creationTime is set incorrectly"
47 Assert
.ok(found
, "Didn't find the cookie we were after");
49 do_throw("Unexpected exception: " + e
.toString());