Bug 1357209 - Add label=type-media to invoked webcompat URL - r=Gijs
authorGerald Squelart <gsquelart@mozilla.com>
Tue, 18 Apr 2017 14:11:51 +1200
changeset 353594 95f1814b35848643f3c16340a7bee1719912ffb5
parent 353593 16be1871115c68a598a6cc1edadd1ed003e5baff
child 353595 fd067187532f2c1d8a17decf01236b453565e274
push id31673
push userkwierso@gmail.com
push dateTue, 18 Apr 2017 21:23:54 +0000
treeherdermozilla-central@1a81aadc2510 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1357209
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/base/content/browser-media.js
browser/base/content/test/general/browser_decoderDoctor.js
--- 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"}));
 });