Bug 1357209 - Add label=type-media to invoked webcompat URL - r?gijs
Following https://github.com/webcompat/webcompat.com/issues/1360 , WebCompat
now accepts an arbitrary label (to help with sorting incoming reports), which
for media issues should be "type-media".
MozReview-Commit-ID: B3vaUOlhTBm
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -341,16 +341,17 @@ let gDecoderDoctorHandler = {
if (!clickedInPref) {
Services.prefs.setBoolPref(buttonClickedPref, true);
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_CLICKED_FIRST);
}
histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_CLICKED);
let params = new URLSearchParams;
params.append("url", docURL);
+ params.append("label", "type-media");
params.append("problem_type", "video_bug");
params.append("src", "media-decode-error");
params.append("details",
"Technical Information:\n" + decodeIssue +
(resourceURL ? ("\nResource: " + resourceURL) : ""));
openUILinkIn(endpoint + "?" + params.toString(), "tab");
}
});
--- a/browser/base/content/test/general/browser_decoderDoctor.js
+++ b/browser/base/content/test/general/browser_decoderDoctor.js
@@ -153,27 +153,27 @@ add_task(function* test_decode_error() {
let message = gNavigatorBundle.getString("decoder.decodeError.message");
yield test_decoder_doctor_notification(
{type: "decode-error", decodeIssue: "DecodeIssue",
docURL: "DocURL", resourceURL: "ResURL"},
message,
gNavigatorBundle.getString("decoder.decodeError.button"),
gNavigatorBundle.getString("decoder.decodeError.accesskey"),
tab_checker_for_webcompat(
- {url: "DocURL", problem_type: "video_bug",
+ {url: "DocURL", label: "type-media", problem_type: "video_bug",
details: "Technical Information:\nDecodeIssue\nResource: ResURL"}));
});
add_task(function* test_decode_warning() {
yield SpecialPowers.pushPrefEnv(
{ set: [["media.decoder-doctor.new-issue-endpoint",
"http://127.0.0.1/webcompat"]] });
let message = gNavigatorBundle.getString("decoder.decodeWarning.message");
yield test_decoder_doctor_notification(
{type: "decode-warning", decodeIssue: "DecodeIssue",
docURL: "DocURL", resourceURL: "ResURL"},
message,
gNavigatorBundle.getString("decoder.decodeError.button"),
gNavigatorBundle.getString("decoder.decodeError.accesskey"),
tab_checker_for_webcompat(
- {url: "DocURL", problem_type: "video_bug",
+ {url: "DocURL", label: "type-media", problem_type: "video_bug",
details: "Technical Information:\nDecodeIssue\nResource: ResURL"}));
});