Bug 1247056 - Added test for cannot-initialize-pulseaudio - r=Gijs
authorGerald Squelart <gsquelart@mozilla.com>
Mon, 26 Sep 2016 02:14:35 -0700
changeset 315341 a540a043466d
parent 315340 25be34cfa5ad
child 315342 75416b1f0938
push id30748
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:53:19 +0000
treeherdermozilla-central@8c84b7618840 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1247056
milestone52.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 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"});
+});