Bug 1247056 - Added test for cannot-initialize-pulseaudio - r=gijs draft
authorGerald Squelart <gsquelart@mozilla.com>
Mon, 26 Sep 2016 02:14:35 -0700
changeset 417927 ada8058d8f71
parent 417926 3b0409dbb4e9
child 532200 293280ddd6bf
push id30524
push usergsquelart@mozilla.com
push dateTue, 27 Sep 2016 09:30:55 +0000
reviewersgijs
bugs1247056
milestone52.0a1
Bug 1247056 - Added test for cannot-initialize-pulseaudio - r=gijs MozReview-Commit-ID: 1dsUYkPMkY5
browser/base/content/test/general/browser_decoderDoctor.js
--- a/browser/base/content/test/general/browser_decoderDoctor.js
+++ b/browser/base/content/test/general/browser_decoderDoctor.js
@@ -32,17 +32,18 @@ function* test_decoder_doctor_notificati
     }
 
     is(button.getAttribute("label"), gNavigatorBundle.getString("decoder.noCodecs.button"),
       "notification button should be 'Learn more'");
     is(button.getAttribute("accesskey"), gNavigatorBundle.getString("decoder.noCodecs.accesskey"),
       "notification button should have accesskey");
 
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
-    let url = baseURL + "fix-video-audio-problems-firefox-windows";
+    let url = baseURL + ((options && options.sumo) ||
+                         "fix-video-audio-problems-firefox-windows");
     let awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, url);
     button.click();
     let sumoTab = yield awaitNewTab;
     yield BrowserTestUtils.removeTab(sumoTab);
   });
 }
 
 add_task(function* test_adobe_cdm_not_found() {
@@ -90,8 +91,20 @@ add_task(function* test_platform_decoder
   } else {
     message = gNavigatorBundle.getString("decoder.noHWAcceleration.message");
   }
 
   yield test_decoder_doctor_notification("platform-decoder-not-found",
                                          message,
                                          {noLearnMoreButton: isLinux});
 });
+
+add_task(function* test_cannot_initialize_pulseaudio() {
+  // This is only sent on Linux.
+  if (AppConstants.platform != "linux") {
+    return;
+  }
+
+  let message = gNavigatorBundle.getString("decoder.noPulseAudio.message");
+  yield test_decoder_doctor_notification("cannot-initialize-pulseaudio",
+                                         message,
+                                         {sumo: "fix-common-audio-and-video-issues"});
+});