Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Base preferences file used by most test harnesses |
michael@0 | 2 | |
michael@0 | 3 | user_pref("browser.console.showInPanel", true); |
michael@0 | 4 | user_pref("browser.dom.window.dump.enabled", true); |
michael@0 | 5 | user_pref("browser.firstrun.show.localepicker", false); |
michael@0 | 6 | user_pref("browser.firstrun.show.uidiscovery", false); |
michael@0 | 7 | user_pref("browser.startup.page", 0); // use about:blank, not browser.startup.homepage |
michael@0 | 8 | user_pref("browser.ui.layout.tablet", 0); // force tablet UI off |
michael@0 | 9 | user_pref("dom.allow_scripts_to_close_windows", true); |
michael@0 | 10 | user_pref("dom.disable_open_during_load", false); |
michael@0 | 11 | user_pref("dom.experimental_forms", true); // on for testing |
michael@0 | 12 | user_pref("dom.forms.number", true); // on for testing |
michael@0 | 13 | user_pref("dom.forms.color", true); // on for testing |
michael@0 | 14 | user_pref("dom.max_script_run_time", 0); // no slow script dialogs |
michael@0 | 15 | user_pref("hangmonitor.timeout", 0); // no hang monitor |
michael@0 | 16 | user_pref("dom.max_chrome_script_run_time", 0); |
michael@0 | 17 | user_pref("dom.popup_maximum", -1); |
michael@0 | 18 | user_pref("dom.send_after_paint_to_content", true); |
michael@0 | 19 | user_pref("dom.successive_dialog_time_limit", 0); |
michael@0 | 20 | user_pref("signed.applets.codebase_principal_support", true); |
michael@0 | 21 | user_pref("browser.shell.checkDefaultBrowser", false); |
michael@0 | 22 | user_pref("shell.checkDefaultClient", false); |
michael@0 | 23 | user_pref("browser.warnOnQuit", false); |
michael@0 | 24 | user_pref("accessibility.typeaheadfind.autostart", false); |
michael@0 | 25 | user_pref("javascript.options.showInConsole", true); |
michael@0 | 26 | user_pref("devtools.errorconsole.enabled", true); |
michael@0 | 27 | user_pref("devtools.debugger.remote-port", 6023); |
michael@0 | 28 | user_pref("layout.debug.enable_data_xbl", true); |
michael@0 | 29 | user_pref("browser.EULA.override", true); |
michael@0 | 30 | user_pref("gfx.color_management.force_srgb", true); |
michael@0 | 31 | user_pref("network.manage-offline-status", false); |
michael@0 | 32 | // Disable speculative connections so they aren't reported as leaking when they're hanging around. |
michael@0 | 33 | user_pref("network.http.speculative-parallel-limit", 0); |
michael@0 | 34 | user_pref("dom.min_background_timeout_value", 1000); |
michael@0 | 35 | user_pref("test.mousescroll", true); |
michael@0 | 36 | user_pref("security.default_personal_cert", "Select Automatically"); // Need to client auth test be w/o any dialogs |
michael@0 | 37 | user_pref("network.http.prompt-temp-redirect", false); |
michael@0 | 38 | user_pref("media.cache_size", 100); |
michael@0 | 39 | user_pref("media.volume_scale", "0.01"); |
michael@0 | 40 | user_pref("security.warn_viewing_mixed", false); |
michael@0 | 41 | user_pref("app.update.enabled", false); |
michael@0 | 42 | user_pref("app.update.staging.enabled", false); |
michael@0 | 43 | user_pref("browser.panorama.experienced_first_run", true); // Assume experienced |
michael@0 | 44 | user_pref("dom.w3c_touch_events.enabled", 1); |
michael@0 | 45 | user_pref("dom.undo_manager.enabled", true); |
michael@0 | 46 | user_pref("dom.webcomponents.enabled", true); |
michael@0 | 47 | // Set a future policy version to avoid the telemetry prompt. |
michael@0 | 48 | user_pref("toolkit.telemetry.prompted", 999); |
michael@0 | 49 | user_pref("toolkit.telemetry.notifiedOptOut", 999); |
michael@0 | 50 | // Existing tests assume there is no font size inflation. |
michael@0 | 51 | user_pref("font.size.inflation.emPerLine", 0); |
michael@0 | 52 | user_pref("font.size.inflation.minTwips", 0); |
michael@0 | 53 | |
michael@0 | 54 | // AddonManager tests require that the experiments provider be present. |
michael@0 | 55 | user_pref("experiments.supported", true); |
michael@0 | 56 | user_pref("experiments.logging.level", "Trace"); |
michael@0 | 57 | user_pref("experiments.logging.dump", true); |
michael@0 | 58 | // Point the manifest at something local so we don't risk it hitting production |
michael@0 | 59 | // data and installing experiments that may vary over time. |
michael@0 | 60 | user_pref("experiments.manifest.uri", "http://%(server)s/experiments-dummy/manifest"); |
michael@0 | 61 | |
michael@0 | 62 | // Only load extensions from the application and user profile |
michael@0 | 63 | // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION |
michael@0 | 64 | user_pref("extensions.enabledScopes", 5); |
michael@0 | 65 | // Disable metadata caching for installed add-ons by default |
michael@0 | 66 | user_pref("extensions.getAddons.cache.enabled", false); |
michael@0 | 67 | // Disable intalling any distribution add-ons |
michael@0 | 68 | user_pref("extensions.installDistroAddons", false); |
michael@0 | 69 | // XPI extensions are required for test harnesses to load |
michael@0 | 70 | user_pref("extensions.defaultProviders.enabled", true); |
michael@0 | 71 | |
michael@0 | 72 | user_pref("geo.wifi.uri", "http://%(server)s/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs"); |
michael@0 | 73 | user_pref("geo.wifi.timeToWaitBeforeSending", 200); |
michael@0 | 74 | user_pref("geo.wifi.scan", false); |
michael@0 | 75 | user_pref("geo.wifi.logging.enabled", true); |
michael@0 | 76 | |
michael@0 | 77 | user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others |
michael@0 | 78 | |
michael@0 | 79 | // Make url-classifier updates so rare that they won't affect tests |
michael@0 | 80 | user_pref("urlclassifier.updateinterval", 172800); |
michael@0 | 81 | // Point the url-classifier to the local testing server for fast failures |
michael@0 | 82 | user_pref("browser.safebrowsing.gethashURL", "http://%(server)s/safebrowsing-dummy/gethash"); |
michael@0 | 83 | user_pref("browser.safebrowsing.updateURL", "http://%(server)s/safebrowsing-dummy/update"); |
michael@0 | 84 | // Point update checks to the local testing server for fast failures |
michael@0 | 85 | user_pref("extensions.update.url", "http://%(server)s/extensions-dummy/updateURL"); |
michael@0 | 86 | user_pref("extensions.update.background.url", "http://%(server)s/extensions-dummy/updateBackgroundURL"); |
michael@0 | 87 | user_pref("extensions.blocklist.url", "http://%(server)s/extensions-dummy/blocklistURL"); |
michael@0 | 88 | user_pref("extensions.hotfix.url", "http://%(server)s/extensions-dummy/hotfixURL"); |
michael@0 | 89 | // Turn off extension updates so they don't bother tests |
michael@0 | 90 | user_pref("extensions.update.enabled", false); |
michael@0 | 91 | // Make sure opening about:addons won't hit the network |
michael@0 | 92 | user_pref("extensions.webservice.discoverURL", "http://%(server)s/extensions-dummy/discoveryURL"); |
michael@0 | 93 | // Make sure AddonRepository won't hit the network |
michael@0 | 94 | user_pref("extensions.getAddons.maxResults", 0); |
michael@0 | 95 | user_pref("extensions.getAddons.get.url", "http://%(server)s/extensions-dummy/repositoryGetURL"); |
michael@0 | 96 | user_pref("extensions.getAddons.getWithPerformance.url", "http://%(server)s/extensions-dummy/repositoryGetWithPerformanceURL"); |
michael@0 | 97 | user_pref("extensions.getAddons.search.browseURL", "http://%(server)s/extensions-dummy/repositoryBrowseURL"); |
michael@0 | 98 | user_pref("extensions.getAddons.search.url", "http://%(server)s/extensions-dummy/repositorySearchURL"); |
michael@0 | 99 | // Make sure that opening the plugins check page won't hit the network |
michael@0 | 100 | user_pref("plugins.update.url", "http://%(server)s/plugins-dummy/updateCheckURL"); |
michael@0 | 101 | |
michael@0 | 102 | // Existing tests don't wait for the notification button security delay |
michael@0 | 103 | user_pref("security.notification_enable_delay", 0); |
michael@0 | 104 | |
michael@0 | 105 | // Make enablePrivilege continue to work for test code. :-( |
michael@0 | 106 | user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true); |
michael@0 | 107 | |
michael@0 | 108 | // In the default configuration, we bypass XBL scopes (a security feature) for |
michael@0 | 109 | // domains whitelisted for remote XUL, so that intranet apps and such continue |
michael@0 | 110 | // to work without major rewrites. However, we also use the whitelist mechanism |
michael@0 | 111 | // to run our XBL tests in automation, in which case we really want to be testing |
michael@0 | 112 | // the configuration that we ship to users without special whitelisting. So we |
michael@0 | 113 | // use an additional pref here to allow automation to use the "normal" behavior. |
michael@0 | 114 | user_pref("dom.use_xbl_scopes_for_remote_xul", true); |
michael@0 | 115 | |
michael@0 | 116 | // Get network events. |
michael@0 | 117 | user_pref("network.activity.blipIntervalMilliseconds", 250); |
michael@0 | 118 | |
michael@0 | 119 | // Don't allow the Data Reporting service to prompt for policy acceptance. |
michael@0 | 120 | user_pref("datareporting.policy.dataSubmissionPolicyBypassAcceptance", true); |
michael@0 | 121 | |
michael@0 | 122 | // Point Firefox Health Report at a local server. We don't care if it actually |
michael@0 | 123 | // works. It just can't hit the default production endpoint. |
michael@0 | 124 | user_pref("datareporting.healthreport.documentServerURI", "http://%(server)s/healthreport/"); |
michael@0 | 125 | user_pref("datareporting.healthreport.about.reportUrl", "http://%(server)s/abouthealthreport/"); |
michael@0 | 126 | |
michael@0 | 127 | // Make sure CSS error reporting is enabled for tests |
michael@0 | 128 | user_pref("layout.css.report_errors", true); |
michael@0 | 129 | |
michael@0 | 130 | // Enable CSS Grid for testing |
michael@0 | 131 | user_pref("layout.css.grid.enabled", true); |
michael@0 | 132 | |
michael@0 | 133 | // Enable mozContacts |
michael@0 | 134 | user_pref("dom.mozContacts.enabled", true); |
michael@0 | 135 | user_pref("dom.navigator-property.disable.mozContacts", false); |
michael@0 | 136 | user_pref("dom.global-constructor.disable.mozContact", false); |
michael@0 | 137 | |
michael@0 | 138 | // Enable mozSettings |
michael@0 | 139 | user_pref("dom.mozSettings.enabled", true); |
michael@0 | 140 | |
michael@0 | 141 | // Make sure the disk cache doesn't get auto disabled |
michael@0 | 142 | user_pref("network.http.bypass-cachelock-threshold", 200000); |
michael@0 | 143 | |
michael@0 | 144 | // Enable Gamepad |
michael@0 | 145 | user_pref("dom.gamepad.enabled", true); |
michael@0 | 146 | user_pref("dom.gamepad.non_standard_events.enabled", true); |
michael@0 | 147 | |
michael@0 | 148 | // Enable Web Audio legacy APIs |
michael@0 | 149 | user_pref("media.webaudio.legacy.BiquadFilterNode", true); |
michael@0 | 150 | user_pref("media.webaudio.legacy.PannerNode", true); |
michael@0 | 151 | user_pref("media.webaudio.legacy.OscillatorNode", true); |
michael@0 | 152 | |
michael@0 | 153 | // Always use network provider for geolocation tests |
michael@0 | 154 | // so we bypass the OSX dialog raised by the corelocation provider |
michael@0 | 155 | user_pref("geo.provider.testing", true); |
michael@0 | 156 | |
michael@0 | 157 | // Background thumbnails in particular cause grief, and disabling thumbnails |
michael@0 | 158 | // in general can't hurt - we re-enable them when tests need them. |
michael@0 | 159 | user_pref("browser.pagethumbnails.capturing_disabled", true); |
michael@0 | 160 | |
michael@0 | 161 | // Indicate that the download panel has been shown once so that whichever |
michael@0 | 162 | // download test runs first doesn't show the popup inconsistently. |
michael@0 | 163 | user_pref("browser.download.panel.shown", true); |
michael@0 | 164 | |
michael@0 | 165 | // prefs for firefox metro. |
michael@0 | 166 | // Disable first-tun tab |
michael@0 | 167 | user_pref("browser.firstrun.count", 0); |
michael@0 | 168 | |
michael@0 | 169 | // Tell the PBackground infrastructure to run a test at startup. |
michael@0 | 170 | user_pref("pbackground.testing", true); |
michael@0 | 171 | |
michael@0 | 172 | // Enable webapps testing mode, which bypasses native installation. |
michael@0 | 173 | user_pref("browser.webapps.testing", true); |
michael@0 | 174 | |
michael@0 | 175 | // Disable android snippets |
michael@0 | 176 | user_pref("browser.snippets.enabled", false); |
michael@0 | 177 | user_pref("browser.snippets.syncPromo.enabled", false); |
michael@0 | 178 | |
michael@0 | 179 | // Disable useragent updates. |
michael@0 | 180 | user_pref("general.useragent.updates.enabled", false); |
michael@0 | 181 | |
michael@0 | 182 | // Disable webapp updates. Yes, it is supposed to be an integer. |
michael@0 | 183 | user_pref("browser.webapps.checkForUpdates", 0); |
michael@0 | 184 | |
michael@0 | 185 | // Do not turn HTTP cache v2 for our infra tests (some tests are failing) |
michael@0 | 186 | user_pref("browser.cache.use_new_backend_temp", false); |
michael@0 | 187 | |
michael@0 | 188 | // Don't connect to Yahoo! for RSS feed tests. |
michael@0 | 189 | // en-US only uses .types.0.uri, but set all of them just to be sure. |
michael@0 | 190 | user_pref('browser.contentHandlers.types.0.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 191 | user_pref('browser.contentHandlers.types.1.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 192 | user_pref('browser.contentHandlers.types.2.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 193 | user_pref('browser.contentHandlers.types.3.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 194 | user_pref('browser.contentHandlers.types.4.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 195 | user_pref('browser.contentHandlers.types.5.uri', 'http://test1.example.org/rss?url=%%s') |
michael@0 | 196 | |
michael@0 | 197 | // We want to collect telemetry, but we don't want to send in the results. |
michael@0 | 198 | user_pref('toolkit.telemetry.server', 'https://%(server)s/telemetry-dummy/'); |
michael@0 | 199 | |
michael@0 | 200 | // We don't want to hit the real Firefox Accounts server for tests. We don't |
michael@0 | 201 | // actually need a functioning FxA server, so just set it to something that |
michael@0 | 202 | // resolves and accepts requests, even if they all fail. |
michael@0 | 203 | user_pref('identity.fxaccounts.auth.uri', 'https://%(server)s/fxa-dummy/'); |
michael@0 | 204 | |
michael@0 | 205 | // Make sure we don't try to load snippets from the network. |
michael@0 | 206 | user_pref("browser.aboutHomeSnippets.updateUrl", "nonexistent://test"); |
michael@0 | 207 | |
michael@0 | 208 | // Ensure UITour won't hit the network |
michael@0 | 209 | user_pref("browser.uitour.pinnedTabUrl", "http://%(server)s/uitour-dummy/pinnedTab"); |
michael@0 | 210 | user_pref("browser.uitour.url", "http://%(server)s/uitour-dummy/tour"); |