Skip to content

Commit

Permalink
Bug 1780668 - Override Telemetry products check in netwerk unit tests…
Browse files Browse the repository at this point in the history
…. r=keeler

This will make the tests work again in Thunderbird, which otherwise doesn't record the data being tested.

Differential Revision: https://phabricator.services.mozilla.com/D152472
  • Loading branch information
darktrojan committed Jul 21, 2022
1 parent 5021652 commit 8123b21
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions netwerk/test/unit/test_be_conservative.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

"use strict";

// Allow telemetry probes which may otherwise be disabled for some
// applications (e.g. Thunderbird).
Services.prefs.setBoolPref(
"toolkit.telemetry.testing.overrideProductsCheck",
true
);

// Tests that nsIHttpChannelInternal.beConservative correctly limits the use of
// advanced TLS features that may cause compatibility issues. Does so by
// starting a TLS server that requires the advanced features and then ensuring
Expand Down
7 changes: 7 additions & 0 deletions netwerk/test/unit/test_ech_grease.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

"use strict";

// Allow telemetry probes which may otherwise be disabled for some
// applications (e.g. Thunderbird).
Services.prefs.setBoolPref(
"toolkit.telemetry.testing.overrideProductsCheck",
true
);

// Get a profile directory and ensure PSM initializes NSS.
do_get_profile();
Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
Expand Down
7 changes: 7 additions & 0 deletions netwerk/test/unit/test_httpssvc_retry_with_ech.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const certOverrideService = Cc[
].getService(Ci.nsICertOverrideService);

function setup() {
// Allow telemetry probes which may otherwise be disabled for some
// applications (e.g. Thunderbird).
Services.prefs.setBoolPref(
"toolkit.telemetry.testing.overrideProductsCheck",
true
);

trr_test_setup();

Services.prefs.setBoolPref("network.dns.upgrade_with_https_rr", true);
Expand Down

0 comments on commit 8123b21

Please sign in to comment.