Bug 1612380 - don't verify content signatures for Thunderbird. r=leplatrem

Differential Revision: https://phabricator.services.mozilla.com/D88541
This commit is contained in:
Magnus Melin 2020-09-01 12:51:08 +00:00
parent f29561d8af
commit f8c4782742
5 changed files with 16 additions and 8 deletions

View File

@ -12,6 +12,7 @@ const { XPCOMUtils } = ChromeUtils.import(
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetters(this, {
AppConstants: "resource://gre/modules/AppConstants.jsm",
ClientEnvironmentBase:
"resource://gre/modules/components-utils/ClientEnvironment.jsm",
Database: "resource://services-settings/Database.jsm",
@ -261,7 +262,7 @@ class RemoteSettingsClient extends EventEmitter {
// This attribute allows signature verification to be disabled, when running tests
// or when pulling data from a dev server.
this.verifySignature = true;
this.verifySignature = AppConstants.REMOTE_SETTINGS_VERIFY_SIGNATURE;
// The bucket preference value can be changed (eg. `main` to `main-preview`) in order
// to preview the changes to be approved in a real client.

View File

@ -45,7 +45,7 @@ async function clear_state() {
await clientWithDump.db.clear();
Services.prefs.clearUserPref("services.settings.default_bucket");
Services.prefs.setCharPref("services.settings.default_bucket", "main");
// Clear events snapshot.
TelemetryTestUtils.assertEvents([], {}, { process: "dummy" });
@ -89,6 +89,7 @@ function run_test() {
run_next_test();
registerCleanupFunction(function() {
Services.prefs.clearUserPref("services.settings.default_bucket");
server.stop(() => {});
});
}

View File

@ -134,11 +134,6 @@ add_task(async function test_support_of_preferences_filters() {
filter_expression:
'"services.settings.default_bucket"|preferenceExists == true',
},
{
willMatch: true,
filter_expression:
'"services.settings.default_bucket"|preferenceIsUserSet == false',
},
{
willMatch: true,
filter_expression:
@ -150,7 +145,7 @@ add_task(async function test_support_of_preferences_filters() {
Services.prefs.setIntPref("services.settings.last_etag", 42);
const list = await client.get();
equal(list.length, 4);
equal(list.length, 3);
ok(list.every(e => e.willMatch));
});

View File

@ -1,4 +1,7 @@
[DEFAULT]
prefs =
services.settings.default_bucket=main
head = ../../../common/tests/unit/head_global.js ../../../common/tests/unit/head_helpers.js
firefox-appdir = browser
tags = remote-settings
@ -12,4 +15,5 @@ support-files = test_attachments_downloader/**
[test_remote_settings_worker.js]
[test_remote_settings_jexl_filters.js]
[test_remote_settings_signatures.js]
skip-if = appname == "thunderbird" # Thunderbird doesn't use content signatures.
[test_shutdown_handling.js]

View File

@ -419,4 +419,11 @@ this.AppConstants = Object.freeze({
#else
false,
#endif
REMOTE_SETTINGS_VERIFY_SIGNATURE:
#ifdef MOZ_THUNDERBIRD
false,
#else
true,
#endif
});