Bug 1568999 - Stop-gap fix for in-test GeckoView enumeration permission request. r=snorp a=test-only
authorAndreas Pehrson <apehrson@mozilla.com>
Tue, 06 Aug 2019 20:08:37 +0000
changeset 541956 064afc956d6dd82cb0041cef889d5839936d07de
parent 541955 c2a7f915903c3a72b6a77b48ecbb4c04e0a709d0
child 541957 046a4257456864d9485f8353fd8a6e5707f83ccf
push id11796
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 01:00:27 +0000
treeherdermozilla-beta@064afc956d6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, test-only
bugs1568999
milestone69.0
Bug 1568999 - Stop-gap fix for in-test GeckoView enumeration permission request. r=snorp a=test-only Differential Revision: https://phabricator.services.mozilla.com/D39865
dom/media/tests/mochitest/test_fingerprinting_resistance.html
dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html
--- a/dom/media/tests/mochitest/test_fingerprinting_resistance.html
+++ b/dom/media/tests/mochitest/test_fingerprinting_resistance.html
@@ -73,16 +73,17 @@ async function testDevices() {
   await testEnumerateDevices(true); // should list a microphone and a camera
   await testGetUserMedia(true); // should get audio and video streams
 }
 
 async function testNoDevices() {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["privacy.resistFingerprinting", false],
+      ["media.navigator.permission.device", false],
       ["media.navigator.streams.fake", false],
       ["media.audio_loopback_dev", "foo"],
       ["media.video_loopback_dev", "bar"]
     ]
   });
   await testEnumerateDevices(false); // should list nothing
   await SpecialPowers.pushPrefEnv({
     set: [
--- a/dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_cubebDisabled.html
@@ -13,16 +13,17 @@
   /**
    * Run a test to verify we fail gracefully if we cannot fetch a cubeb context
    * during a gUM call.
    */
   runTest(async function () {
     info("Get user media with cubeb disabled starting");
     // Push prefs to ensure no cubeb context and no fake streams.
     await pushPrefs(["media.cubeb.force_null_context", true],
+                    ["media.navigator.permission.device", false],
                     ["media.navigator.streams.fake", false]);
 
     // Request audio only, to avoid cams
     let constraints = {audio: true, video: false};
     let stream;
     try {
       stream = await getUserMedia(constraints);
     } catch (e) {