Bug 1900438 - Set the app parameter to either "android" or "firefox" in the AbuseReporter class. r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D212468
This commit is contained in:
William Durand 2024-06-03 20:11:46 +00:00
parent 25fc59ce1a
commit b168ac0261
3 changed files with 6 additions and 4 deletions

View file

@ -230,7 +230,7 @@ export const AbuseReporter = {
data.client_id = await lazy.ClientID.getClientIdHash();
data.app = Services.appinfo.name.toLowerCase();
data.app = AppConstants.platform === "android" ? "android" : "firefox";
data.appversion = Services.appinfo.version;
data.lang = Services.locale.appLocaleAsBCP47;
data.operating_system = AppConstants.platform;

View file

@ -10,7 +10,6 @@ const { ClientID } = ChromeUtils.importESModule(
"resource://gre/modules/ClientID.sys.mjs"
);
const APPNAME = "XPCShell";
const APPVERSION = "1";
const ADDON_ID = "test-addon@tests.mozilla.org";
const FAKE_INSTALL_INFO = {
@ -81,7 +80,11 @@ async function assertBaseReportData({ reportData, addon }) {
await ClientID.getClientIdHash(),
"Got the expected 'client_id'"
);
equal(reportData.app, APPNAME.toLowerCase(), "Got expected 'app'");
equal(
reportData.app,
AppConstants.platform === "android" ? "android" : "firefox",
"Got expected 'app'"
);
equal(reportData.appversion, APPVERSION, "Got expected 'appversion'");
equal(
reportData.lang,

View file

@ -17,7 +17,6 @@ support-files = [
skip-if = ["os == 'android'"]
["test_AbuseReporter.js"]
skip-if = ["os == 'android'"]
["test_AddonRepository.js"]
skip-if = ["os == 'android'"]