user.js (13261B)
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 // Base preferences file to allow unittests to run successfully. 6 // NOTE: Toggling prefs for testing features should happen in 7 // unittest-features/user.js or in harness/test manifests, not here! 8 /* globals user_pref */ 9 // Make sure Shield doesn't hit the network. 10 user_pref("app.normandy.api_url", ""); 11 // Make sure the notification permission migration test doesn't hit the network. 12 user_pref("app.support.baseURL", "http://{server}/support-dummy/"); 13 user_pref("app.update.staging.enabled", false); 14 // Increase the APZ content response timeout in tests to 1 minute. 15 // This is to accommodate the fact that test environments tends to be slower 16 // than production environments (with the b2g emulator being the slowest of them 17 // all), resulting in the production timeout value sometimes being exceeded 18 // and causing false-positive test failures. See bug 1176798, bug 1177018, 19 // bug 1210465. 20 user_pref("apz.content_response_timeout", 60000); 21 // Disable Bookmark backups by default. 22 user_pref("browser.bookmarks.max_backups", 0); 23 // Indicate that the download panel has been shown once so that whichever 24 // download test runs first doesn't show the popup inconsistently. 25 user_pref("browser.download.panel.shown", true); 26 user_pref("browser.newtabpage.activity-stream.default.sites", ""); 27 user_pref("browser.newtabpage.activity-stream.telemetry", false); 28 // Point the url-classifier to the local testing server for fast failures 29 user_pref("browser.safebrowsing.downloads.remote.url", "http://{server}/safebrowsing-dummy/update"); 30 user_pref("browser.safebrowsing.provider.google.gethashURL", "http://{server}/safebrowsing-dummy/gethash"); 31 user_pref("browser.safebrowsing.provider.google.updateURL", "http://{server}/safebrowsing-dummy/update"); 32 user_pref("browser.safebrowsing.provider.google4.gethashURL", "http://{server}/safebrowsing4-dummy/gethash"); 33 user_pref("browser.safebrowsing.provider.google4.updateURL", "http://{server}/safebrowsing4-dummy/update"); 34 user_pref("browser.safebrowsing.provider.google5.gethashURL", "http://{server}/safebrowsing5-dummy/gethash"); 35 user_pref("browser.safebrowsing.provider.google5.updateURL", "http://{server}/safebrowsing5-dummy/update"); 36 user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://{server}/safebrowsing-dummy/gethash"); 37 user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://{server}/safebrowsing-dummy/update"); 38 user_pref("browser.ipProtection.guardian.endpoint", "http://{server}/vpn-dummy"); 39 user_pref("browser.search.suggest.timeout", 10000); // use a 10s suggestion timeout in tests 40 user_pref("browser.shell.checkDefaultBrowser", false); 41 user_pref("browser.startup.page", 0); // use about:blank, not browser.startup.homepage 42 // Don't show a delay when hiding the audio indicator during tests 43 user_pref("browser.tabs.delayHidingAudioPlayingIconMS", 0); 44 // Ensure UITour won't hit the network 45 user_pref("browser.uitour.url", "http://{server}/uitour-dummy/tour"); 46 // Turn off Merino suggestions in the location bar so as not to trigger network 47 // connections. 48 user_pref("browser.urlbar.merino.endpointURL", ""); 49 user_pref("browser.urlbar.speculativeConnect.enabled", false); 50 // Turn off search suggestions in the location bar so as not to trigger network 51 // connections. 52 user_pref("browser.urlbar.suggest.searches", false); 53 // URIFixup whitelist 54 user_pref("browser.fixup.domainsuffixwhitelist.test", true); 55 user_pref("browser.warnOnQuit", false); 56 user_pref("captivedetect.canonicalURL", "http://{server}/captive-detect/success.txt"); 57 // Enable android logcat for better diagnostics on beta/release 58 user_pref("consoleservice.logcat", true); 59 // Point Firefox Health Report at a local server. We don't care if it actually 60 // works. It just can't hit the default production endpoint. 61 user_pref("datareporting.healthreport.documentServerURI", "http://{server}/healthreport/"); 62 user_pref("datareporting.healthreport.uploadEnabled", false); 63 user_pref("devtools.browsertoolbox.panel", "jsdebugger"); 64 user_pref("devtools.debugger.remote-port", 6023); 65 user_pref("devtools.testing", true); 66 user_pref("dom.allow_scripts_to_close_windows", true); 67 user_pref("dom.disable_open_during_load", false); 68 user_pref("dom.ipc.reportProcessHangs", true); // process hang monitor 69 // Don't forceably kill content processes after a timeout 70 user_pref("dom.ipc.tabs.shutdownTimeoutSecs", 0); 71 user_pref("dom.min_background_timeout_value", 1000); 72 user_pref("dom.popup_maximum", -1); 73 // Prevent connection to the push server for tests. 74 user_pref("dom.push.connection.enabled", false); 75 user_pref("dom.successive_dialog_time_limit", 0); 76 // In the default configuration, we bypass XBL scopes (a security feature) for 77 // domains whitelisted for remote XUL, so that intranet apps and such continue 78 // to work without major rewrites. However, we also use the whitelist mechanism 79 // to run our XBL tests in automation, in which case we really want to be testing 80 // the configuration that we ship to users without special whitelisting. So we 81 // use an additional pref here to allow automation to use the "normal" behavior. 82 user_pref("dom.use_xbl_scopes_for_remote_xul", true); 83 user_pref("extensions.autoDisableScopes", 0); 84 user_pref("extensions.blocklist.detailsURL", "http://{server}/extensions-dummy/blocklistDetailsURL"); 85 user_pref("extensions.blocklist.itemURL", "http://{server}/extensions-dummy/blocklistItemURL"); 86 // Disable metadata caching for installed add-ons by default 87 user_pref("extensions.getAddons.cache.enabled", false); 88 // Make sure AddonRepository won't hit the network 89 user_pref("extensions.getAddons.get.url", "http://{server}/extensions-dummy/repositoryGetURL"); 90 user_pref("extensions.getAddons.search.browseURL", "http://{server}/extensions-dummy/repositoryBrowseURL"); 91 user_pref("extensions.hotfix.url", "http://{server}/extensions-dummy/hotfixURL"); 92 // Disable intalling any distribution add-ons 93 user_pref("extensions.installDistroAddons", false); 94 user_pref("extensions.systemAddon.update.url", "http://{server}/dummy-system-addons.xml"); 95 user_pref("extensions.systemAddon.update.enabled", false); 96 user_pref("extensions.update.background.url", "http://{server}/extensions-dummy/updateBackgroundURL"); 97 // Point update checks to the local testing server for fast failures 98 user_pref("extensions.update.url", "http://{server}/extensions-dummy/updateURL"); 99 user_pref("findbar.highlightAll", false); 100 user_pref("findbar.modalHighlight", false); 101 // Existing tests assume there is no font size inflation. 102 user_pref("font.size.inflation.emPerLine", 0); 103 user_pref("font.size.inflation.minTwips", 0); 104 // Always use network provider for geolocation tests 105 // so we bypass the OSX dialog raised by the corelocation provider 106 user_pref("geo.provider.testing", true); 107 user_pref("geo.provider.network.logging.enabled", true); 108 user_pref("geo.provider.network.scan", false); 109 user_pref("geo.provider.network.timeToWaitBeforeSending", 2000); 110 user_pref("geo.provider.network.url", "http://{server}/tests/dom/geolocation/test/mochitest/network_geolocation.sjs"); 111 user_pref("gfx.color_management.force_srgb", true); 112 user_pref("gfx.logging.level", 1); 113 // We don't want to hit the real Firefox Accounts server for tests. We don't 114 // actually need a functioning FxA server, so just set it to something that 115 // resolves and accepts requests, even if they all fail. 116 user_pref("identity.fxaccounts.auth.uri", "https://{server}/fxa-dummy/"); 117 // Ditto for all the FxA content root URI. 118 user_pref("identity.fxaccounts.remote.root", "https://{server}/"); 119 // Make sure CSS error reporting is enabled for tests 120 user_pref("layout.css.report_errors", true); 121 user_pref("media.cache_size", 1000); 122 user_pref("media.dormant-on-pause-timeout-ms", 0); // Enter dormant immediately without waiting for timeout. 123 // Set the number of shmems the PChromiumCDM protocol pre-allocates to 0, 124 // so that we test the case where we under-estimate how many shmems we need 125 // to send decoded video frames from the CDM to Gecko. 126 user_pref("media.eme.chromium-api.video-shmems", 0); 127 // Make sure GMPInstallManager won't hit the network. 128 user_pref("media.gmp-manager.url.override", "http://{server}/dummy-gmp-manager.xml"); 129 user_pref("media.hls.server.url", "http://{server}/tests/dom/media/test/hls"); 130 // Don't block old libavcodec libraries when testing, because our test systems 131 // cannot easily be upgraded. 132 user_pref("media.libavcodec.allow-obsolete", true); 133 user_pref("media.memory_cache_max_size", 32); 134 user_pref("media.memory_caches_combined_limit_kb", 256); 135 user_pref("media.preload.auto", 3); // auto = enough 136 user_pref("media.preload.default", 2); // default = metadata 137 user_pref("media.preload.default.cellular", 2); // default = metadata 138 user_pref("media.suspend-background-video.enabled", false); 139 user_pref("media.volume_scale", "0.01"); 140 // Enable speech synth test service, and disable built in platform services. 141 user_pref("media.webspeech.synth.test", true); 142 user_pref("network.http.prompt-temp-redirect", false); 143 // Disable speculative connections so they aren't reported as leaking when they're hanging around. 144 user_pref("network.http.speculative-parallel-limit", 0); 145 user_pref("network.manage-offline-status", false); 146 // Set places maintenance far in the future (the maximum time possible in an 147 // int32_t) to avoid it kicking in during tests. The maintenance can take a 148 // relatively long time which may cause unnecessary intermittents and slow down 149 // tests. This, like many things, will stop working correctly in 2038. 150 user_pref("places.database.lastMaintenance", 2147483647); 151 // Turn off semantic history search as it triggers network connections to 152 // download ML models. 153 user_pref("places.semanticHistory.featureGate", false); 154 // Disable all recommended Remote Protocol preferences for Gecko tests. 155 // The prefs recommended by Remote Protocol are typically geared towards 156 // consumer automation; not vendor testing. 157 user_pref("remote.prefs.recommended", false); 158 user_pref("security.default_personal_cert", "Select Automatically"); // Need to client auth test be w/o any dialogs 159 // Existing tests don't wait for the notification button security delay 160 user_pref("security.notification_enable_delay", 0); 161 // Ensure blocklist updates don't hit the network 162 user_pref("services.settings.server", "data:,#remote-settings-dummy/v1"); 163 // Disable password capture, so that mochitests that include forms aren't 164 // influenced by the presence of the persistent doorhanger notification. 165 user_pref("signon.rememberSignons", false); 166 user_pref("startup.homepage_welcome_url", "about:blank"); 167 user_pref("startup.homepage_welcome_url.additional", ""); 168 user_pref("test.mousescroll", true); 169 // Don't send 'bhr' ping during tests, otherwise the testing framework might 170 // wait on the pingsender to finish and slow down tests. 171 user_pref("toolkit.telemetry.bhrPing.enabled", false); 172 // Don't send the 'first-shutdown' during tests, otherwise tests expecting 173 // main and subsession pings will fail. 174 user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); 175 // Don't send 'new-profile' ping on new profiles during tests, otherwise the testing framework 176 // might wait on the pingsender to finish and slow down tests. 177 user_pref("toolkit.telemetry.newProfilePing.enabled", false); 178 // We want to collect telemetry, but we don't want to send in the results. 179 user_pref("toolkit.telemetry.server", "https://{server}/telemetry-dummy/"); 180 // Default Glean to "record but don't report" mode, and to never trigger 181 // activity-based ping submission. Docs: 182 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/preferences.html 183 user_pref("telemetry.fog.test.localhost_port", -1); 184 user_pref("telemetry.fog.test.activity_limit", -1); 185 user_pref("telemetry.fog.test.inactivity_limit", -1); 186 // Don't send the 'shutdown' ping using the pingsender on the first session using 187 // the 'pingsender' process. Valgrind marks the process as leaky (e.g. see bug 1364068 188 // for the 'new-profile' ping) but does not provide enough information 189 // to suppress the leak. Running locally does not reproduce the issue, 190 // so disable this until we rewrite the pingsender in Rust (bug 1339035). 191 user_pref("toolkit.telemetry.shutdownPingSender.enabledFirstSession", false); 192 // A couple of preferences with default values to test that telemetry preference 193 // watching is working. 194 user_pref("toolkit.telemetry.test.pref1", true); 195 user_pref("toolkit.telemetry.test.pref2", false); 196 // Disable the caret blinking so we get stable snapshot 197 user_pref("ui.caretBlinkTime", -1); 198 // Disable scrollbar animations. Tests that count paints / refresh driver ticks 199 // shouldn't need to account for them. 200 user_pref("ui.scrollbarFadeDuration", 0); 201 202 // Disable intermittent telemetry collection 203 user_pref("toolkit.telemetry.initDelay", 99999999); 204 205 // We use data: to tell the Quitter extension to quit. 206 user_pref("security.data_uri.block_toplevel_data_uri_navigations", false); 207 208 // We use data: to tell the Quitter extension to quit. 209 user_pref("security.data_uri.block_toplevel_data_uri_navigations", false); 210 211 // Turn off update 212 user_pref("app.update.disabledForTesting", true);