tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

user.js (5789B)


      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 // Common preferences file used by both unittest and perf harnesses.
      6 /* globals user_pref */
      7 user_pref("app.update.checkInstallTime", false);
      8 user_pref("app.update.disabledForTesting", true);
      9 user_pref("browser.chrome.guess_favicon", false);
     10 user_pref("browser.dom.window.dump.enabled", true);
     11 user_pref("devtools.console.stdout.chrome", true);
     12 // asrouter expects a plain object or null
     13 user_pref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "null");
     14 user_pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "null");
     15 user_pref("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", "null");
     16 user_pref("browser.newtabpage.activity-stream.feeds.system.topstories", false);
     17 user_pref("browser.newtabpage.activity-stream.tippyTop.service.endpoint", "");
     18 user_pref("browser.newtabpage.activity-stream.discoverystream.config", "[]");
     19 user_pref("browser.newtabpage.activity-stream.unifiedAds.endpoint", "");
     20 
     21 // For Activity Stream firstrun page, use an empty string to avoid fetching.
     22 user_pref("browser.newtabpage.activity-stream.fxaccounts.endpoint", "");
     23 // Background thumbnails in particular cause grief, and disabling thumbnails
     24 // in general can't hurt - we re-enable them when tests need them.
     25 user_pref("browser.pagethumbnails.capturing_disabled", true);
     26 // Tell the search service we are running in the US.  This also has the desired
     27 // side-effect of preventing our geoip lookup.
     28 user_pref("browser.search.region", "US");
     29 // disable infobar for tests
     30 user_pref("browser.search.removeEngineInfobar.enabled", false);
     31 // We do not wish to display datareporting policy notifications as it might
     32 // cause other tests to fail. Tests that wish to test the notification functionality
     33 // should explicitly disable this pref.
     34 user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
     35 user_pref("dom.max_chrome_script_run_time", 0);
     36 user_pref("dom.max_script_run_time", 0); // no slow script dialogs
     37 user_pref("dom.send_after_paint_to_content", true);
     38 // Only load extensions from the application and user profile
     39 // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
     40 user_pref("extensions.enabledScopes", 5);
     41 user_pref("extensions.experiments.enabled", true);
     42 // Turn off extension updates so they don't bother tests
     43 user_pref("extensions.update.enabled", false);
     44 // Prevent network access for recommendations by default. The payload is {"results":[]}.
     45 user_pref("extensions.getAddons.discovery.api_url", "data:;base64,eyJyZXN1bHRzIjpbXX0%3D");
     46 // Treat WebExtension API/schema warnings as errors.
     47 user_pref("extensions.webextensions.warnings-as-errors", true);
     48 // Disable useragent updates.
     49 user_pref("general.useragent.updates.enabled", false);
     50 user_pref("media.gmp-manager.updateEnabled", false);
     51 // Don't do network connections for mitm priming
     52 user_pref("security.certerrors.mitm.priming.enabled", false);
     53 // Enable some dangerous features for test code. :-(
     54 user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
     55 user_pref("xpinstall.signatures.required", false);
     56 // Prevent Remote Settings to issue non local connections.
     57 user_pref("services.settings.server", "data:,#remote-settings-dummy/v1");
     58 // Ensure autoplay is enabled for all platforms.
     59 user_pref("media.autoplay.default", 0); // 0=Allowed, 1=Blocked, 2=Prompt
     60 user_pref("media.autoplay.blocking_policy", 0);
     61 user_pref("media.allowed-to-play.enabled", true);
     62 // Ensure media can always play without delay
     63 user_pref("media.block-autoplay-until-in-foreground", false);
     64 // Don't ask for a request in testing unless explicitly set this as true.
     65 user_pref("media.geckoview.autoplay.request", false);
     66 // No need to delay wakelock releasing for testing
     67 user_pref("media.wakelock.audio.delay-releasing.ms", 0);
     68 // Don't use SCContentSharingPicker in tests as it will block on user
     69 // interaction.
     70 user_pref("media.getdisplaymedia.screencapturekit.picker.enabled", false);
     71 user_pref("browser.region.network.url", "");
     72 // Do not unload tabs on low memory when testing
     73 user_pref("browser.tabs.unloadOnLowMemory", false);
     74 // Don't pull Top Sites content from the network
     75 user_pref("browser.topsites.contile.enabled", false);
     76 // Don't pull weather data from the network
     77 user_pref("browser.newtabpage.activity-stream.system.showWeather", false);
     78 // Don't pull wallpaper content from the network
     79 user_pref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", false);
     80 // Don't pull sponsored Top Sites content from the network
     81 user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
     82 // Default Glean to "record but don't report" mode, and to never trigger
     83 // activity-based ping submission. Docs:
     84 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/preferences.html
     85 user_pref("telemetry.fog.test.localhost_port", -1);
     86 user_pref("telemetry.fog.test.activity_limit", -1);
     87 user_pref("telemetry.fog.test.inactivity_limit", -1);
     88 // Disable overlay scrollbars on GTK for testing. A bunch of tests (specially
     89 // mochitests) assume scrollbars take space. We disable them on macOS (where
     90 // overlay is also the default) at the system level as well, so this is
     91 // probably ok.
     92 //
     93 // We test the relevant overlay scrollbar code-paths on Android.
     94 user_pref("widget.gtk.overlay-scrollbars.enabled", false);
     95 // Generally, we don't want daily idle tasks run during tests. Specific tests
     96 // can re-enable if needed.
     97 user_pref("idle.lastDailyNotification", -1);
     98 // Honor logging prefs set for certain test suites.
     99 user_pref("logging.config.clear_on_startup", false);