fune/browser/experiments/test/xpcshell/test_telemetry_disabled.js
Chris H-C 75fc345254 bug 1406391 - Remove toolkit.telemetry.enabled manipulation from tests r=Dexter
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.

MozReview-Commit-ID: 9spzuUAXwwP
2017-10-30 10:47:39 -04:00

20 lines
553 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
Cu.import("resource:///modules/experiments/Experiments.jsm");
add_test(function test_experiments_activation() {
do_get_profile();
loadAddonManager();
Services.prefs.setBoolPref(PREF_EXPERIMENTS_ENABLED, true);
Services.telemetry.canRecordExtended = false;
let experiments = Experiments.instance();
Assert.ok(!experiments.enabled, "Experiments must be disabled if Telemetry is disabled.");
run_next_test();
});