diff --git a/browser/components/originattributes/test/browser/browser_favicon_firstParty.js b/browser/components/originattributes/test/browser/browser_favicon_firstParty.js
index d350aee8da57..5997c4af5476 100644
--- a/browser/components/originattributes/test/browser/browser_favicon_firstParty.js
+++ b/browser/components/originattributes/test/browser/browser_favicon_firstParty.js
@@ -183,8 +183,8 @@ async function assignCookiesUnderFirstParty(aURL, aFirstParty, aCookieValue) {
async function generateCookies(aThirdParty) {
// we generate two different cookies for two first party domains.
let cookies = [];
- cookies.push(Math.random().toString() + "=1");
- cookies.push(Math.random().toString() + "=1");
+ cookies.push(Math.random().toString());
+ cookies.push(Math.random().toString());
let firstSiteURL;
let secondSiteURL;
diff --git a/browser/components/originattributes/test/browser/browser_favicon_userContextId.js b/browser/components/originattributes/test/browser/browser_favicon_userContextId.js
index 62f042aed2e4..00457eb1a522 100644
--- a/browser/components/originattributes/test/browser/browser_favicon_userContextId.js
+++ b/browser/components/originattributes/test/browser/browser_favicon_userContextId.js
@@ -128,8 +128,8 @@ function waitOnFaviconLoaded(aFaviconURL) {
async function generateCookies(aHost) {
// we generate two different cookies for two userContextIds.
let cookies = [];
- cookies.push(Math.random().toString() + "=1");
- cookies.push(Math.random().toString() + "=1");
+ cookies.push(Math.random().toString());
+ cookies.push(Math.random().toString());
// Then, we add cookies into the site for 'personal' and 'work'.
let tabInfoA = await openTabInUserContext(aHost, USER_CONTEXT_ID_PERSONAL);
diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
index bbeebc5cea1c..bac6fa648631 100644
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
@@ -189,8 +189,8 @@ add_task(async function test_favicon_privateBrowsing() {
// Generate two random cookies for non-private window and private window
// respectively.
let cookies = [];
- cookies.push(Math.random().toString() + "=1");
- cookies.push(Math.random().toString() + "=1");
+ cookies.push(Math.random().toString());
+ cookies.push(Math.random().toString());
// Open a tab in private window and add a cookie into it.
await assignCookies(privateWindow.gBrowser, TEST_SITE, cookies[0]);
diff --git a/browser/components/sessionstore/test/browser_sessionStoreContainer.js b/browser/components/sessionstore/test/browser_sessionStoreContainer.js
index e5627e23c66f..74830f16f0a3 100644
--- a/browser/components/sessionstore/test/browser_sessionStoreContainer.js
+++ b/browser/components/sessionstore/test/browser_sessionStoreContainer.js
@@ -114,7 +114,7 @@ add_task(async function test() {
for (let userContextId of Object.keys(USER_CONTEXTS)) {
// Load the page in 3 different contexts and set a cookie
// which should only be visible in that context.
- let cookie = USER_CONTEXTS[userContextId] + "=1";
+ let cookie = USER_CONTEXTS[userContextId];
// Open our tab in the given user context.
let { tab, browser } = await openTabInUserContext(userContextId);
diff --git a/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html b/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html
index 053953ed6fea..ff122f31a44f 100644
--- a/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html
+++ b/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html
@@ -5,11 +5,11 @@ file_browserElement_CookiesNotThirdParty.html
';
+ resp.setHeader("Set-Cookie", "red", false);
+ setCookieScript = '';
}
if (opts.setGreenCookie) {
- resp.setHeader("Set-Cookie", "green=1", false);
- setCookieScript = '';
+ resp.setHeader("Set-Cookie", "green", false);
+ setCookieScript = '';
}
if (opts.iframe) {
@@ -43,14 +43,14 @@ function handleRequest(req, resp) {
}
if (req.hasHeader("Cookie") &&
- req.getHeader("Cookie").split(";").indexOf("red=1") >= 0) {
+ req.getHeader("Cookie").split(";").indexOf("red") >= 0) {
resp.write('' + setCookieScript + '');
resp.finish();
return;
}
if (req.hasHeader("Cookie") &&
- req.getHeader("Cookie").split(";").indexOf("green=1") >= 0) {
+ req.getHeader("Cookie").split(";").indexOf("green") >= 0) {
resp.write('' + setCookieScript + '');
resp.finish();
return;