From 355835bd63f57e93b3f52d54ce15125a0f64edbe Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Thu, 29 Feb 2024 09:44:56 +0100 Subject: [PATCH] chore: set "network.cookie.cookieBehavior" preference to "0" only for CDP (#12016) --- packages/browsers/src/browser-data/firefox.ts | 4 ---- packages/puppeteer-core/src/node/FirefoxLauncher.ts | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/browsers/src/browser-data/firefox.ts b/packages/browsers/src/browser-data/firefox.ts index 6c221930135..87e3804c8f0 100644 --- a/packages/browsers/src/browser-data/firefox.ts +++ b/packages/browsers/src/browser-data/firefox.ts @@ -235,10 +235,6 @@ function defaultProfilePreferences( // Disable the GFX sanity window 'media.sanity-test.disabled': true, - // Prevent various error message on the console - // jest-puppeteer asserts that no error message is emitted by the console - 'network.cookie.cookieBehavior': 0, - // Disable experimental feature that is only available in Nightly 'network.cookie.sameSite.laxByDefault': false, diff --git a/packages/puppeteer-core/src/node/FirefoxLauncher.ts b/packages/puppeteer-core/src/node/FirefoxLauncher.ts index 7b166c48cb3..1af09192ec7 100644 --- a/packages/puppeteer-core/src/node/FirefoxLauncher.ts +++ b/packages/puppeteer-core/src/node/FirefoxLauncher.ts @@ -50,6 +50,9 @@ export class FirefoxLauncher extends ProductLauncher { : { // Do not close the window when the last tab gets closed 'browser.tabs.closeWindowWithLastTab': false, + // Prevent various error message on the console + // jest-puppeteer asserts that no error message is emitted by the console + 'network.cookie.cookieBehavior': 0, // Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263) 'fission.bfcacheInParent': false, // Only enable the CDP protocol