summaryrefslogtreecommitdiffstats
path: root/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /toolkit/components/antitracking/test/browser/browser_partitionedCookies.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/antitracking/test/browser/browser_partitionedCookies.js')
-rw-r--r--toolkit/components/antitracking/test/browser/browser_partitionedCookies.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js b/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js
index d2d1e87dd4..d2e88795b1 100644
--- a/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js
+++ b/toolkit/components/antitracking/test/browser/browser_partitionedCookies.js
@@ -1,7 +1,9 @@
PartitionedStorageHelper.runTestInNormalAndPrivateMode(
"HTTP Cookies",
async (win3rdParty, win1stParty, allowed) => {
- await win3rdParty.fetch("cookies.sjs?3rd").then(r => r.text());
+ await win3rdParty
+ .fetch("cookies.sjs?3rd;Partitioned;Secure")
+ .then(r => r.text());
await win3rdParty
.fetch("cookies.sjs")
.then(r => r.text())
@@ -39,7 +41,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode(
async _ => {
await new Promise(resolve => {
- Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value =>
+ Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () =>
resolve()
);
});
@@ -49,7 +51,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode(
PartitionedStorageHelper.runTestInNormalAndPrivateMode(
"DOM Cookies",
async (win3rdParty, win1stParty, allowed) => {
- win3rdParty.document.cookie = "foo=3rd";
+ win3rdParty.document.cookie = "foo=3rd;Partitioned;Secure";
is(win3rdParty.document.cookie, "foo=3rd", "3rd party cookie set");
win1stParty.document.cookie = "foo=first";
@@ -72,7 +74,7 @@ PartitionedStorageHelper.runTestInNormalAndPrivateMode(
async _ => {
await new Promise(resolve => {
- Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value =>
+ Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () =>
resolve()
);
});
@@ -90,14 +92,14 @@ PartitionedStorageHelper.runPartitioningTestInNormalAndPrivateMode(
// addDataCallback
async (win, value) => {
- win.document.cookie = value;
+ win.document.cookie = value + ";Partitioned;Secure";
return true;
},
// cleanup
async _ => {
await new Promise(resolve => {
- Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value =>
+ Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () =>
resolve()
);
});
@@ -121,14 +123,16 @@ PartitionedStorageHelper.runPartitioningTestInNormalAndPrivateMode(
// addDataCallback
async (win, value) => {
- await win.fetch("cookies.sjs?" + value).then(r => r.text());
+ await win
+ .fetch("cookies.sjs?" + value + ";Partitioned;Secure")
+ .then(r => r.text());
return true;
},
// cleanup
async _ => {
await new Promise(resolve => {
- Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value =>
+ Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, () =>
resolve()
);
});