Bug 1340631 - Remove the telemetry-related crash annotation tests r=Ted

MozReview-Commit-ID: BS4jS9ph1fX

--HG--
extra : source : b9ea9be3ecc300abb2bda37420f2e267af1613f9
extra : amend_source : 3e9d827487133b8e3bcfb0687037cbaa5656e762
This commit is contained in:
Gabriele Svelto 2017-02-21 22:36:12 +01:00
parent c689bdaa35
commit 7826396cee

View File

@ -46,29 +46,5 @@ function run_test() {
do_check_eq(extra["\u2665"], "\u{1F4A9}");
do_check_eq(extra.Notes, "JunkMoreJunk");
do_check_true("TelemetrySessionId" in extra);
Assert.ok(
"TelemetryServerURL" in extra,
"The TelemetryServerURL field is omitted when telemetry is off"
);
});
do_crash(function() {
// Enable telemetry
let prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
// Turn on telemetry and specify a telemetry server
prefs.setCharPref("toolkit.telemetry.server", "http://a.telemetry.server");
prefs.setBoolPref("toolkit.telemetry.enabled", true);
// TelemetrySession setup will trigger the session annotation
let scope = {};
Components.utils.import("resource://gre/modules/TelemetryController.jsm", scope);
scope.TelemetryController.testSetup();
}, function(mdump, extra) {
Assert.ok("TelemetryServerURL" in extra,
"The TelemetryServerURL field is present in the extra file");
Assert.equal(extra.TelemetryServerURL, "http://a.telemetry.server",
"The TelemetryServerURL field is properly set");
});
}