Skip to content

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

chore(bidi): Disable some external services for Firefox (#34492)

Henrik Skupind63907fc5b76
diff --git a/packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts b/packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts
index bf082793b6..3e0c347b52 100644
--- a/packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts
+++ b/packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts
@@ -54,10 +54,23 @@ function defaultProfilePreferences(
// console
// https://bugzilla.mozilla.org/show_bug.cgi?id=1543115
'browser.dom.window.dump.enabled': true,
+
+ // Make sure newtab weather doesn't hit the network to retrieve weather data.
+ 'browser.newtabpage.activity-stream.discoverystream.region-weather-config': '',
+
+ // Make sure newtab wallpapers don't hit the network to retrieve wallpaper data.
+ 'browser.newtabpage.activity-stream.newtabWallpapers.enabled': false,
+ 'browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled': false,
+
+ // Make sure Topsites doesn't hit the network to retrieve sponsored tiles.
+ 'browser.newtabpage.activity-stream.showSponsoredTopSites': false,
+
// Disable topstories
'browser.newtabpage.activity-stream.feeds.system.topstories': false,
+
// Always display a blank page
'browser.newtabpage.enabled': false,
+
// Background thumbnails in particular cause grief: and disabling
// thumbnails in general cannot hurt
'browser.pagethumbnails.capturing_disabled': true,
@@ -193,6 +206,9 @@ function defaultProfilePreferences(
// Disable the GFX sanity window
'media.sanity-test.disabled': true,
+ // Disable connectivity service pings
+ 'network.connectivity-service.enabled': false,
+
// Disable experimental feature that is only available in Nightly
'network.cookie.sameSite.laxByDefault': false,
@@ -228,9 +244,6 @@ function defaultProfilePreferences(
// Do not wait for the notification button security delay
'security.notification_enable_delay': 0,
- // Ensure blocklist updates do not hit the network
- 'services.settings.server': `http://${server}/dummy/blocklist/`,
-
// Do not automatically fill sign-in forms with known usernames and
// passwords
'signon.autofillForms': false,