tor-browser

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

user.js (5989B)


      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 for web-platform-tests.
      6 /* globals user_pref */
      7 // Don't use the new tab page but about:blank for opened tabs
      8 user_pref("browser.newtabpage.enabled", false);
      9 // Don't restore the last open set of tabs if the browser has crashed
     10 user_pref("browser.sessionstore.resume_from_crash", false);
     11 // Don't show the Bookmarks Toolbar on any tab (the above pref that
     12 // disables the New Tab Page ends up showing the toolbar on about:blank).
     13 user_pref("browser.toolbars.bookmarks.visibility", "never");
     14 // Expose TestUtils interface
     15 user_pref("dom.testing.testutils.enabled", true);
     16 // Only install add-ons from the profile and the application scope
     17 // Also ensure that those are not getting disabled.
     18 // see: https://developer.mozilla.org/en/Installing_extensions
     19 user_pref("extensions.autoDisableScopes", 10);
     20 // Don't open a dialog to show available add-on updates
     21 user_pref("extensions.update.notifyUser", false);
     22 // For cross-browser tests, don't fail on manifest warnings like unknown keys.
     23 user_pref("extensions.webextensions.warnings-as-errors", false);
     24 // Adjust behavior of browser.test API to be compatible across engines.
     25 user_pref("extensions.wpt.enabled", true);
     26 // Enable test mode to run multiple tests in parallel
     27 user_pref("focusmanager.testmode", true);
     28 // Enable fake media streams for getUserMedia
     29 user_pref("media.navigator.streams.fake", true);
     30 // Disable permission prompt for getUserMedia
     31 user_pref("media.navigator.permission.disabled", true);
     32 // Enable direct connection
     33 user_pref("network.proxy.type", 0);
     34 // Web-platform-tests load a lot of URLs very quickly. This puts avoidable and
     35 // unnecessary I/O pressure on the Places DB (measured to be in the
     36 // gigabytes).
     37 user_pref("places.history.enabled", false);
     38 // Suppress automatic safe mode after crashes
     39 user_pref("toolkit.startup.max_resumed_crashes", -1);
     40 // Run the font loader task eagerly for more predictable behavior
     41 user_pref("gfx.font_loader.delay", 0);
     42 // Disable antialiasing for the Ahem font.
     43 user_pref("gfx.font_rendering.ahem_antialias_none", true);
     44 // Disable safebrowsing components
     45 user_pref("browser.safebrowsing.blockedURIs.enabled", false);
     46 user_pref("browser.safebrowsing.downloads.enabled", false);
     47 user_pref("browser.safebrowsing.malware.enabled", false);
     48 user_pref("browser.safebrowsing.phishing.enabled", false);
     49 user_pref("browser.safebrowsing.update.enabled", false);
     50 // Disable high DPI
     51 user_pref("layout.css.devPixelsPerPx", "1.0");
     52 // Enable the parallel styling code.
     53 user_pref("layout.css.stylo-threads", 4);
     54 // sometime wpt runs test even before the document becomes visible, which would
     55 // delay video.play() and cause play() running in wrong order.
     56 user_pref("media.block-autoplay-until-in-foreground", false);
     57 // Disable dark scrollbars as it can be semi-transparent that many reftests
     58 // don't expect.
     59 user_pref("widget.disable-dark-scrollbar", true);
     60 // The Ubuntu Yaru theme has semi-transparent scrollbar track, which some tests
     61 // assume doesn't exist.
     62 user_pref("widget.gtk.theme-scrollbar-colors.enabled", false);
     63 // Disable scrollbar animations. Otherwise reftests that use overlay scrollbars
     64 // (only Android right now), might get a snapshot at different times during the
     65 // animation.
     66 user_pref("ui.scrollbarFadeDuration", 0);
     67 user_pref("media.block-autoplay-until-in-foreground", false);
     68 // Force a light color scheme unless explicitly overridden by pref.
     69 user_pref("layout.css.prefers-color-scheme.content-override", 1);
     70 // A lot of tests use the Reporting API for observing things
     71 user_pref("dom.reporting.enabled", true);
     72 // Enable WebDriver BiDi experimental commands and events during tests.
     73 user_pref("remote.experimental.enabled", true);
     74 // Dismiss file pickers for WebDriver BiDi sessions.
     75 user_pref("remote.bidi.dismiss_file_pickers.enabled", true);
     76 // Disable OCSP checks in WPT (webtransport triggers these occasionally)
     77 user_pref("security.OCSP.enabled", 0);
     78 // Disable download of intermediate certificates.
     79 user_pref("security.remote_settings.intermediates.enabled", false);
     80 // Disable prefers-reduced-motion to ensure that smooth scrolls can be tested.
     81 user_pref("general.smoothScroll", true);
     82 // Prevent default handlers being added, since these can cause network fetches
     83 user_pref("gecko.handlerService.defaultHandlersVersion", 100);
     84 // Enable virtual WebAuthn authenticators.
     85 user_pref("security.webauth.webauthn_enable_softtoken", true);
     86 // Disable hardware WebAuthn authenticators.
     87 user_pref("security.webauth.webauthn_enable_usbtoken", false);
     88 // Disable the WebAuthn direct attestation consent prompt.
     89 user_pref("security.webauthn.always_allow_direct_attestation", true);
     90 // Enable WebAuthn conditional mediation.
     91 user_pref("security.webauthn.enable_conditional_mediation", true);
     92 // Disable captive portal service
     93 user_pref("network.captive-portal-service.enabled", false);
     94 // Enable http2 websockets support
     95 user_pref("network.http.http2.websockets", true);
     96 // Turn off update
     97 user_pref("app.update.disabledForTesting", true);
     98 // Use dummy server for geolocation
     99 user_pref("geo.provider.network.url", "https://web-platform.test:8444/_mozilla/geolocation-API/dummy.py");
    100 // If we are on a platform where we can detect that we don't have OS
    101 // geolocation permission, and we can open it and wait for the user to give
    102 // permission, then don't do that.
    103 user_pref("geo.prompt.open_system_prefs", false);
    104 
    105 // prefs to force font, specifically from ubuntu 18.04
    106 user_pref("font.name.serif.x-western", "DejaVu Serif");
    107 user_pref("font.name.sans-serif.x-western", "DejaVu Sans");
    108 user_pref("font.name.monospace.x-western", "DejaVu Sans Mono");
    109 user_pref("font.name.serif.x-unicode", "DejaVu Serif");
    110 user_pref("font.name.sans-serif.x-unicode", "DejaVu Sans");
    111 user_pref("font.name.monospace.x-unicode", "DejaVu Sans Mono");