diff --git a/browser/base/content/test/general/browser_remoteTroubleshoot.js b/browser/base/content/test/general/browser_remoteTroubleshoot.js index 93bd466f9dea..0ce34e32990c 100644 --- a/browser/base/content/test/general/browser_remoteTroubleshoot.js +++ b/browser/base/content/test/general/browser_remoteTroubleshoot.js @@ -54,6 +54,23 @@ add_task(function*() { Assert.ok(got.message.extensions, "should have extensions"); Assert.ok(got.message.graphics, "should have graphics"); + // Check we have channel and build ID info: + Assert.equal(got.message.application.buildID, Services.appinfo.appBuildID, + "should have correct build ID"); + + let updateChannel = null; + try { + updateChannel = Cu.import("resource://gre/modules/UpdateChannel.jsm", {}).UpdateChannel.get(); + } catch (ex) {} + if (!updateChannel) { + Assert.ok(!('updateChannel' in got.message.application), + "should not have update channel where not available."); + } else { + Assert.equal(got.message.application.updateChannel, updateChannel, + "should have correct update channel."); + } + + // And check some keys we know we decline to return. Assert.ok(!got.message.modifiedPreferences, "should not have a modifiedPreferences key"); Assert.ok(!got.message.crashes, "should not have crash info"); diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index cc317df4798c..e830766e2d02 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -131,10 +131,16 @@ let dataProviders = { let data = { name: Services.appinfo.name, version: Services.appinfo.version, + buildID: Services.appinfo.appBuildID, userAgent: Cc["@mozilla.org/network/protocol;1?name=http"]. getService(Ci.nsIHttpProtocolHandler). userAgent, }; + +#ifdef MOZ_UPDATER + data.updateChannel = Cu.import("resource://gre/modules/UpdateChannel.jsm", {}).UpdateChannel.get(); +#endif + try { data.vendor = Services.prefs.getCharPref("app.support.vendor"); } diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index cd805b440ac8..fb47c9710a19 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -88,6 +88,10 @@ const SNAPSHOT_SCHEMA = { required: true, type: "string", }, + buildID: { + required: true, + type: "string", + }, userAgent: { required: true, type: "string", @@ -95,6 +99,9 @@ const SNAPSHOT_SCHEMA = { vendor: { type: "string", }, + updateChannel: { + type: "string", + }, supportURL: { type: "string", },