Bug 1660264 - remove code we no longer need from the report site issue extension; r=denschub,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D87786
This commit is contained in:
Thomas Wisniewski 2020-08-20 18:02:35 +00:00
parent b668e1475c
commit a133ea6323
5 changed files with 1 additions and 73 deletions

View File

@ -100,7 +100,6 @@ function getWebCompatInfoForTab(tab) {
return Promise.all([
browser.browserInfo.getBlockList(),
browser.browserInfo.getBuildID(),
browser.browserInfo.getGPUInfo(),
browser.browserInfo.getGraphicsPrefs(),
browser.browserInfo.getUpdateChannel(),
browser.browserInfo.hasTouchScreen(),
@ -114,7 +113,6 @@ function getWebCompatInfoForTab(tab) {
([
blockList,
buildID,
GPUs,
graphicsPrefs,
channel,
hasTouchScreen,
@ -137,7 +135,6 @@ function getWebCompatInfoForTab(tab) {
channel,
consoleLog,
frameworks,
GPUs,
hasTouchScreen,
"mixed active content blocked":
frameInfo.hasMixedActiveContentBlocked,

View File

@ -9,9 +9,6 @@
var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
var { Troubleshoot } = ChromeUtils.import(
"resource://gre/modules/Troubleshoot.jsm"
);
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
function isTelemetryEnabled() {
@ -56,36 +53,6 @@ this.browserInfo = class extends ExtensionAPI {
// the user has enabled the strict list.
return trackingTable.includes("content") ? "strict" : "basic";
},
async getGPUInfo() {
if (!isTelemetryEnabled() || !isWebRenderEnabled()) {
return undefined;
}
let gpus = [];
await new Promise(resolve => {
Troubleshoot.snapshot(async function(snapshot) {
const { graphics } = snapshot;
const activeGPU = graphics.isGPU2Active ? 2 : 1;
gpus.push({
active: activeGPU == 1,
description: graphics.adapterDescription,
deviceID: graphics.adapterDeviceID,
vendorID: graphics.adapterVendorID,
driverVersion: graphics.driverVersion,
});
if ("adapterDescription2" in graphics) {
gpus.push({
active: activeGPU == 2,
description: graphics.adapterDescription2,
deviceID: graphics.adapterDeviceID2,
vendorID: graphics.adapterVendorID2,
driverVersion: graphics.driverVersion2,
});
}
resolve();
});
});
return gpus;
},
async getBuildID() {
return Services.appinfo.appBuildID;
},

View File

@ -31,13 +31,6 @@
"parameters": [],
"async": true
},
{
"name": "getGPUInfo",
"type": "function",
"description": "Gets basic info on GPUs #1 and #2 (if webrender is on and telemetry is not disabled)",
"parameters": [],
"async": true
},
{
"name": "getPlatform",
"type": "function",

View File

@ -3,7 +3,7 @@
"name": "WebCompat Reporter",
"description": "Report site compatibility issues on webcompat.com",
"author": "Thomas Wisniewski <twisniewski@mozilla.com>",
"version": "1.3.0",
"version": "1.4.0",
"homepage_url": "https://github.com/mozilla/webcompat-reporter",
"applications": {
"gecko": {

View File

@ -204,35 +204,6 @@ add_task(async function test_opened_page() {
typeof details["image.mem.shared"] == "boolean",
"Details has image.mem.shared."
);
if (
Services.prefs.getBoolPref("gfx.webrender.all", false) ||
Services.prefs.getBoolPref("gfx.webrender.enabled", false)
) {
ok(typeof details.GPUs == "object", "Details has GPUs");
ok(typeof details.GPUs[0] == "object", "Details has GPUs[0]");
ok(
typeof details.GPUs[0].active == "boolean",
"Details has GPUs[0].active"
);
ok(
typeof details.GPUs[0].description == "string",
"Details has GPUs[0].description"
);
ok(
typeof details.GPUs[0].deviceID == "string",
"Details has GPUs[0].deviceID"
);
ok(
typeof details.GPUs[0].driverVersion == "string",
"Details has GPUs[0].driverVersion"
);
ok(
typeof details.GPUs[0].vendorID == "string",
"Details has GPUs[0].vendorID"
);
} else {
ok(!("GPUs" in details), "Details does not have GPUs");
}
is(
preview.innerText,