Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
browser(firefox): disable update, setting sync and other non-testing features (#1480)
Pavel Feldman9826fd652ef7
diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBERindex bc51cd774c..f1f0ca518c 100644--- a/browser_patches/firefox/BUILD_NUMBER+++ b/browser_patches/firefox/BUILD_NUMBER@@ -1 +1 @@-1050+1051diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diffindex 96a3fa10de..ac2727ecf7 100644--- a/browser_patches/firefox/patches/bootstrap.diff+++ b/browser_patches/firefox/patches/bootstrap.diff@@ -6726,6 +6726,19 @@ index 6dca2b78830edc1ddbd66264bd332853729dac71..fbe89c9682834e11b9d9219d9eb056edreturn NS_ERROR_NOT_AVAILABLE;}+diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm+index 36da62856100a9db680f2515d9dc5427d8945233..b29d93917386d2f70d35122da0fdbe0a7b3484f1 100644+--- a/services/settings/Utils.jsm++++ b/services/settings/Utils.jsm+@@ -42,7 +42,7 @@ var Utils = {+ Ci.nsIEnvironment+ );+ const isXpcshell = env.exists("XPCSHELL_TEST_PROFILE_DIR");+- return AppConstants.RELEASE_OR_BETA && !Cu.isInAutomation && !isXpcshell++ return false && !Cu.isInAutomation && !isXpcshell+ ? "https://firefox.settings.services.mozilla.com/v1"+ : gServerURL;+ },diff --git a/toolkit/components/statusfilter/nsBrowserStatusFilter.cpp b/toolkit/components/statusfilter/nsBrowserStatusFilter.cppindex 7e10920c900670949c2bef73715bde0eb4f0ea23..8c0f31c01bce59e24fa83faeae69813b3ee60de7 100644--- a/toolkit/components/statusfilter/nsBrowserStatusFilter.cpp@@ -6749,6 +6762,19 @@ index 7e10920c900670949c2bef73715bde0eb4f0ea23..8c0f31c01bce59e24fa83faeae69813bint32_t aCurSelfProgress,int32_t aMaxSelfProgress,int32_t aCurTotalProgress,+diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm+index 33caae56237e10f01fbcbf3ea9bf5ebf22e82763..1538c49f64b36a706de5ece79075319696409789 100644+--- a/toolkit/mozapps/update/UpdateService.jsm++++ b/toolkit/mozapps/update/UpdateService.jsm+@@ -3097,7 +3097,7 @@ UpdateService.prototype = {+ ).running;+ }++- return (++ return true || (+ (Cu.isInAutomation || marionetteRunning) &&+ Services.prefs.getBoolPref(PREF_APP_UPDATE_DISABLEDFORTESTING, false)+ );diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuildindex 299230cb3bde5ecd111454ed6f59d1f0504b67a1..09f4ef69776217e5e9f5cc4ad4de939887d8c871 100644--- a/toolkit/toolkit.mozbuilddiff --git a/browser_patches/firefox/preferences/playwright.cfg b/browser_patches/firefox/preferences/playwright.cfgindex 6a56bee855..709b15c764 100644--- a/browser_patches/firefox/preferences/playwright.cfg+++ b/browser_patches/firefox/preferences/playwright.cfg@@ -1,5 +1,13 @@// Any comment. You must start the file with a comment!+pref("dom.push.serverURL", "");+pref("services.settings.server", "");+pref("browser.safebrowsing.provider.mozilla.updateURL", "");+pref("browser.library.activity-stream.enabled", false);+pref("browser.search.geoSpecificDefaults", false);+pref("browser.search.geoSpecificDefaults.url", "");++// Make sure Shield doesn't hit the network.pref("app.normandy.api_url", "");pref("app.normandy.enabled", false);@@ -107,8 +115,8 @@ pref("browser.warnOnQuit", false);// Do not show datareporting policy notifications which can// interfere with tests-pref("datareporting.healthreport.documentServerURI", "http://dummydummy.test/dummy/healthreport/");-pref("datareporting.healthreport.about.reportUrl", "http://dummydummy.test/dummy/abouthealthreport/");+pref("datareporting.healthreport.documentServerURI", "");+pref("datareporting.healthreport.about.reportUrl", "");pref("datareporting.healthreport.logging.consoleEnabled", false);pref("datareporting.healthreport.service.enabled", false);pref("datareporting.healthreport.service.firstRun", false);@@ -147,7 +155,7 @@ pref("extensions.update.enabled", false);pref("extensions.update.notifyUser", false);// Make sure opening about:addons will not hit the network-pref("extensions.webservice.discoverURL", "http://dummydummy.test/dummy/discoveryURL");+pref("extensions.webservice.discoverURL", "");pref("extensions.screenshots.disabled", true);pref("extensions.screenshots.upload-disabled", true);@@ -190,7 +198,7 @@ pref("network.http.speculative-parallel-limit", 0);pref("network.manage-offline-status", false);// Make sure SNTP requests do not hit the network-pref("network.sntp.pools", "dummydummy.test");+pref("network.sntp.pools", "");// Disable Flashpref("plugin.state.flash", 0);@@ -207,7 +215,7 @@ pref("security.fileuri.strict_origin_policy", false);pref("security.notification_enable_delay", 0);// Ensure blocklist updates do not hit the network-pref("services.settings.server", "http://dummydummy.test/dummy/blocklist/");+pref("services.settings.server", "");// Disable DocumentChannel.// See https://github.com/microsoft/playwright/pull/451@@ -230,7 +238,7 @@ pref("toolkit.startup.max_resumed_crashes", -1);lockPref("toolkit.crashreporter.enabled", false);pref("toolkit.telemetry.enabled", false);-pref("toolkit.telemetry.server", "https://dummydummy.test/dummy/telemetry");+pref("toolkit.telemetry.server", "");// Disable crash reporter.Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;