tor-browser

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

user.js (7412B)


      1 // Preference file for the reftest harness.
      2 /* globals user_pref */
      3 // Make sure Shield doesn't hit the network.
      4 user_pref("app.normandy.api_url", "https://localhost/selfsupport-dummy/");
      5 user_pref("app.update.staging.enabled", false);
      6 user_pref("browser.safebrowsing.blockedURIs.enabled", false);
      7 user_pref("browser.safebrowsing.downloads.enabled", false);
      8 user_pref("browser.safebrowsing.downloads.remote.url", "http://127.0.0.1/safebrowsing-dummy/gethash");
      9 user_pref("browser.safebrowsing.malware.enabled", false);
     10 // Likewise for safebrowsing.
     11 user_pref("browser.safebrowsing.phishing.enabled", false);
     12 user_pref("browser.safebrowsing.provider.google.gethashURL", "http://127.0.0.1/safebrowsing-dummyg/gethash");
     13 user_pref("browser.safebrowsing.provider.google.updateURL", "http://127.0.0.1/safebrowsing-dummyg/update");
     14 user_pref("browser.safebrowsing.provider.google4.gethashURL", "http://127.0.0.1/safebrowsing-dummyg4/gethash");
     15 user_pref("browser.safebrowsing.provider.google4.updateURL", "http://127.0.0.1/safebrowsing-dummyg4/update");
     16 user_pref("browser.safebrowsing.provider.google5.gethashURL", "http://127.0.0.1/safebrowsing-dummyg5/gethash");
     17 user_pref("browser.safebrowsing.provider.google5.updateURL", "http://127.0.0.1/safebrowsing-dummyg5/update");
     18 user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://127.0.0.1/safebrowsing-dummym/gethash");
     19 user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://127.0.0.1/safebrowsing-dummym/update");
     20 // use about:blank, not browser.startup.homepage
     21 user_pref("browser.startup.page", 0);
     22 // Since our tests are 800px wide, set the assume-designed-for width of all
     23 // pages to be 800px (instead of the default of 980px). This ensures that
     24 // in our 800px window we don't zoom out by default to try to fit the
     25 // assumed 980px content.
     26 user_pref("browser.viewport.desktopWidth", 800);
     27 user_pref("datareporting.healthreport.uploadEnabled", false);
     28 // Don't forcibly kill content processes after a timeout
     29 user_pref("dom.ipc.tabs.shutdownTimeoutSecs", 0);
     30 // For mochitests, we're more interested in testing the behavior of in-
     31 // content XBL bindings, so we set this pref to true. In reftests, we're
     32 // more interested in testing the behavior of XBL as it works in chrome,
     33 // so we want this pref to be false.
     34 user_pref("dom.use_xbl_scopes_for_remote_xul", false);
     35 user_pref("extensions.autoDisableScopes", 0);
     36 // Disable blocklist updates so we don't have them reported as leaks
     37 user_pref("extensions.blocklist.enabled", false);
     38 user_pref("extensions.getAddons.cache.enabled", false);
     39 user_pref("extensions.getAddons.get.url", "http://localhost/extensions-dummy/repositoryGetURL");
     40 user_pref("extensions.systemAddon.update.url", "http://localhost/dummy-system-addons.xml");
     41 user_pref("gfx.color_management.force_srgb", true);
     42 user_pref("gfx.color_management.mode", 2);
     43 user_pref("gfx.logging.level", 1);
     44 // Disable downscale-during-decode, since it makes reftests more difficult.
     45 user_pref("image.downscale-during-decode.enabled", false);
     46 // We do the capturing the reftest results with sync decoding
     47 // so we want to be consistent.
     48 user_pref("image.testing.decode-sync.enabled", true);
     49 // Disable interruptible reflow since (1) it's normally not going to
     50 // happen, but (2) it might happen if we somehow end up with both
     51 // pending user events and clock skew.  So to avoid having to change
     52 // MakeProgress to deal with waiting for interruptible reflows to
     53 // complete for a rare edge case, we just disable interruptible
     54 // reflow so that that rare edge case doesn't lead to reftest
     55 // failures.
     56 user_pref("layout.interruptible-reflow.enabled", false);
     57 // Disable the fade of overlay scrollbars, since we can't guarantee taking both
     58 // reftest snapshots at the same point during the fade.
     59 user_pref("layout.testing.overlay-scrollbars.always-visible", true);
     60 user_pref("ui.scrollbarFadeDuration", 0);
     61 // Disable dark and themed scrollbars because they might be
     62 // semi-transparent.
     63 user_pref("widget.gtk.theme-scrollbar-colors.enabled", false);
     64 user_pref("widget.disable-dark-scrollbar", true);
     65 // Disable antialiasing of ahem font.
     66 user_pref("gfx.font_rendering.ahem_antialias_none", true);
     67 // Run the "deferred" font-loader immediately, because if it finishes
     68 // mid-test, the extra reflow that is triggered can disrupt the test.
     69 user_pref("gfx.font_loader.delay", 0);
     70 // Ensure bundled fonts are activated, even if not enabled by default
     71 // on the platform, so that tests can rely on them.
     72 user_pref("gfx.bundled-fonts.activate", 1);
     73 // The broken image icon doesn't block the load event and thus there's no easy
     74 // way to guarantee it's loaded by the time we take the reftest screenshot.
     75 user_pref("layout.image.eager_broken_image_icon", true);
     76 user_pref("media.gmp-manager.url.override", "http://localhost/dummy-gmp-manager.xml");
     77 // Reftests load a lot of URLs very quickly. This puts avoidable and
     78 // unnecessary I/O pressure on the Places DB (measured to be in the
     79 // gigabytes).
     80 user_pref("places.history.enabled", false);
     81 user_pref("privacy.trackingprotection.annotate_channels", false);
     82 user_pref("privacy.trackingprotection.enabled", false);
     83 user_pref("privacy.trackingprotection.pbmode.enabled", false);
     84 // Disable all recommended Remote Protocol preferences for Gecko tests.
     85 // The prefs recommended by Remote Protocol are typically geared towards
     86 // consumer automation; not vendor testing.
     87 user_pref("remote.prefs.recommended", false);
     88 // Checking whether two files are the same is slow on Windows.
     89 // Setting this pref makes tests run much faster there. Reftests also
     90 // rely on this to load downloadable fonts (which are restricted to same
     91 // origin policy by default) from outside their directory.
     92 user_pref("security.fileuri.strict_origin_policy", false);
     93 user_pref("startup.homepage_override_url", "");
     94 user_pref("startup.homepage_welcome_url", "");
     95 user_pref("startup.homepage_welcome_url.additional", "");
     96 // A fake bool pref for "@supports -moz-bool-pref" sanify test.
     97 user_pref("testing.supports.moz-bool-pref", false);
     98 // Ensure that telemetry is disabled, so we don't connect to the telemetry
     99 // server in the middle of the tests.
    100 user_pref("toolkit.telemetry.enabled", false);
    101 user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy/");
    102 // Default Glean to "record but don't report" mode, and to never trigger
    103 // activity-based ping submission. Docs:
    104 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/preferences.html
    105 user_pref("telemetry.fog.test.localhost_port", -1);
    106 user_pref("telemetry.fog.test.activity_limit", -1);
    107 user_pref("telemetry.fog.test.inactivity_limit", -1);
    108 user_pref("ui.caretBlinkTime", -1);
    109 user_pref("ui.caretWidth", 1);
    110 user_pref("ui.prefersReducedMotion", 0);
    111 user_pref("ui.systemUsesDarkTheme", 0);
    112 user_pref("ui.useAccessibilityTheme", 0);
    113 // Turn off the Push service.
    114 user_pref("dom.push.serverURL", "");
    115 // Disable intermittent telemetry collection
    116 user_pref("toolkit.telemetry.initDelay", 99999999);
    117 // Setting this pref to true for usercss reftests, since it relies on userContent.css
    118 user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
    119 // Use a light color-scheme unless explicitly overriden.
    120 user_pref("layout.css.prefers-color-scheme.content-override", 1);
    121 // Turn off update
    122 user_pref("app.update.disabledForTesting", true);
    123 // Disable pixel alignment
    124 user_pref("layout.disable-pixel-alignment", true);