prefs.rs (6921B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 use mozprofile::preferences::Pref; 6 7 // ALL CHANGES TO THIS FILE MUST HAVE REVIEW FROM A GECKODRIVER PEER! 8 // 9 // Please refer to INSTRUCTIONS TO ADD A NEW PREFERENCE in 10 // remote/shared/RecommendedPreferences.sys.mjs 11 // 12 // Note: geckodriver is used out-of-tree with various builds of Firefox. 13 // Removing a preference from this file will cause regressions, 14 // so please be careful and get review from a Testing :: geckodriver peer 15 // before you make any changes to this file. 16 lazy_static! { 17 pub static ref DEFAULT: Vec<(&'static str, Pref)> = vec![ 18 // Make sure Shield doesn't hit the network. 19 ("app.normandy.api_url", Pref::new("")), 20 21 // Disable Firefox old build background check 22 ("app.update.checkInstallTime", Pref::new(false)), 23 24 // Disable automatically upgrading Firefox 25 // 26 // Note: Possible update tests could reset or flip the value to allow 27 // updates to be downloaded and applied. 28 ("app.update.disabledForTesting", Pref::new(true)), 29 30 // Enable the dump function, which sends messages to the system 31 // console 32 ("browser.dom.window.dump.enabled", Pref::new(true)), 33 ("devtools.console.stdout.chrome", Pref::new(true)), 34 35 // Do not restore the last open set of tabs if the browser crashed 36 ("browser.sessionstore.resume_from_crash", Pref::new(false)), 37 38 // Skip check for default browser on startup 39 ("browser.shell.checkDefaultBrowser", Pref::new(false)), 40 41 // Do not redirect user when a milestone upgrade of Firefox 42 // is detected 43 ("browser.startup.homepage_override.mstone", Pref::new("ignore")), 44 45 // Start with a blank page (about:blank) 46 ("browser.startup.page", Pref::new(0)), 47 48 // Disable the UI tour 49 ("browser.uitour.enabled", Pref::new(false)), 50 51 // Do not warn on quitting Firefox 52 ("browser.warnOnQuit", Pref::new(false)), 53 54 // Defensively disable data reporting systems 55 ("datareporting.healthreport.documentServerURI", Pref::new("http://%(server)s/dummy/healthreport/")), 56 ("datareporting.healthreport.logging.consoleEnabled", Pref::new(false)), 57 ("datareporting.healthreport.service.enabled", Pref::new(false)), 58 ("datareporting.healthreport.service.firstRun", Pref::new(false)), 59 ("datareporting.healthreport.uploadEnabled", Pref::new(false)), 60 61 // Do not show datareporting policy notifications which can 62 // interfere with tests 63 ("datareporting.policy.dataSubmissionEnabled", Pref::new(false)), 64 ("datareporting.policy.dataSubmissionPolicyBypassNotification", Pref::new(true)), 65 66 // Disable the ProcessHangMonitor 67 ("dom.ipc.reportProcessHangs", Pref::new(false)), 68 69 // Only load extensions from the application and user profile 70 // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION 71 ("extensions.autoDisableScopes", Pref::new(0)), 72 ("extensions.enabledScopes", Pref::new(5)), 73 74 // Disable intalling any distribution extensions or add-ons 75 ("extensions.installDistroAddons", Pref::new(false)), 76 77 // Turn off extension updates so they do not bother tests 78 ("extensions.update.enabled", Pref::new(false)), 79 ("extensions.update.notifyUser", Pref::new(false)), 80 81 // Allow the application to have focus even it runs in the 82 // background 83 ("focusmanager.testmode", Pref::new(true)), 84 85 // Disable useragent updates 86 ("general.useragent.updates.enabled", Pref::new(false)), 87 88 // Always use network provider for geolocation tests so we bypass 89 // the macOS dialog raised by the corelocation provider 90 ("geo.provider.testing", Pref::new(true)), 91 92 // Do not scan wi-fi 93 ("geo.wifi.scan", Pref::new(false)), 94 95 // No hang monitor 96 ("hangmonitor.timeout", Pref::new(0)), 97 98 // Disable idle-daily notifications to avoid expensive operations 99 // that may cause unexpected test timeouts. 100 ("idle.lastDailyNotification", Pref::new(-1)), 101 102 // Disable download and usage of OpenH264, and Widevine plugins 103 ("media.gmp-manager.updateEnabled", Pref::new(false)), 104 105 // Disable the GFX sanity window 106 ("media.sanity-test.disabled", Pref::new(true)), 107 108 // Do not automatically switch between offline and online 109 ("network.manage-offline-status", Pref::new(false)), 110 111 // Make sure SNTP requests do not hit the network 112 ("network.sntp.pools", Pref::new("%(server)s")), 113 114 // Don't do network connections for mitm priming 115 ("security.certerrors.mitm.priming.enabled", Pref::new(false)), 116 117 // Ensure remote settings do not hit the network 118 ("services.settings.server", Pref::new("data:,#remote-settings-dummy/v1")), 119 120 // Disable first run pages 121 ("startup.homepage_welcome_url", Pref::new("about:blank")), 122 ("startup.homepage_welcome_url.additional", Pref::new("")), 123 124 // asrouter expects a plain object or null 125 ("browser.newtabpage.activity-stream.asrouter.providers.cfr", Pref::new("null")), 126 // TODO: Remove once minimum supported Firefox release is 93. 127 ("browser.newtabpage.activity-stream.asrouter.providers.cfr-fxa", Pref::new("null")), 128 129 // TODO: Remove once minimum supported Firefox release is 128. 130 ("browser.newtabpage.activity-stream.asrouter.providers.snippets", Pref::new("null")), 131 132 ("browser.newtabpage.activity-stream.asrouter.providers.message-groups", Pref::new("null")), 133 // TODO: Remove once minimum supported Firefox release is 126. 134 ("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", Pref::new("null")), 135 ("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", Pref::new("null")), 136 ("browser.newtabpage.activity-stream.feeds.system.topstories", Pref::new(false)), 137 138 // TODO: Remove once minimum supported Firefox release is 128. 139 ("browser.newtabpage.activity-stream.feeds.snippets", Pref::new(false)), 140 141 ("browser.newtabpage.activity-stream.tippyTop.service.endpoint", Pref::new("")), 142 ("browser.newtabpage.activity-stream.discoverystream.config", Pref::new("[]")), 143 144 // For Activity Stream firstrun page, use an empty string to avoid fetching. 145 ("browser.newtabpage.activity-stream.fxaccounts.endpoint", Pref::new("")), 146 147 // Prevent starting into safe mode after application crashes 148 ("toolkit.startup.max_resumed_crashes", Pref::new(-1)), 149 150 // Disable webapp updates. 151 ("browser.webapps.checkForUpdates", Pref::new(0)), 152 ]; 153 }