const tests = [
// Pref on: This cookie is already expired.
// Pref off: This cookie is still expired.
{ cookieName: "test1",
serverTime: "",
expireTime: currentTime - 24*60*60*1000,
expectedCookieWithPrefOn: "",
expectedCookieWithPrefOff: "" },
// Pref on: This cookie is not expired because the server time is in the past.
// Pref off: This cookie is expired.
{ cookieName: "test2",
serverTime: currentTime - 3 * DAY,
expireTime: currentTime - DAY,
expectedCookieWithPrefOn: "test2=foo",
expectedCookieWithPrefOff: "" },
// Pref on: This cookie is expired because the server time is in the future.
// Pref off: This cookie is not expired.
{ cookieName: "test3",
serverTime: currentTime + 3 * DAY,
expireTime: currentTime + DAY,
expectedCookieWithPrefOn: "" ,
expectedCookieWithPrefOff: "test3=foo" },
]
for (const test of tests) {
await cleanupData();
is(document.cookie, "", "No cookies");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.