Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test(bidi): allow firefoxUserPrefs in Playwright's own tests (#40660)

Holger Benle1f429b1b17b
diff --git a/packages/playwright-core/src/remote/playwrightServer.ts b/packages/playwright-core/src/remote/playwrightServer.ts
index 7b8a30d2ca..960a4a6e27 100644
--- a/packages/playwright-core/src/remote/playwrightServer.ts
+++ b/packages/playwright-core/src/remote/playwrightServer.ts
@@ -373,7 +373,7 @@ function filterLaunchOptions(options: LaunchOptionsWithTimeout, allowUnsafe: boo
headless: options.headless,
proxy: options.proxy,
chromiumSandbox: allowUnsafe ? options.chromiumSandbox : undefined,
- firefoxUserPrefs: allowUnsafe ? options.firefoxUserPrefs : undefined,
+ firefoxUserPrefs: (isUnderTest() || allowUnsafe) ? options.firefoxUserPrefs : undefined,
slowMo: options.slowMo,
executablePath: (isUnderTest() || allowUnsafe) ? options.executablePath : undefined,
downloadsPath: allowUnsafe ? options.downloadsPath : undefined,