Bug 1565738 - Re-enable disabled WebRTC tests on macOS Mojave r=jib
authorHaik Aftandilian <haftandilian@mozilla.com>
Wed, 25 Sep 2019 17:43:46 +0000
changeset 494989 570be65ab4acd4f40ce48dd48544314cbd55c5c4
parent 494988 371641b1010b834f4144fdb8688a511c381a6776
child 494990 065260671bea3007c8ed103496a8653c4a5f1eb8
push id96355
push userhaftandilian@mozilla.com
push dateWed, 25 Sep 2019 20:58:23 +0000
treeherderautoland@570be65ab4ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1565738
milestone71.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 1565738 - Re-enable disabled WebRTC tests on macOS Mojave r=jib Re-enable skipped webRTC tests on Mac which were disabled due to the macOS 10.14 permission prompts causing timeouts. Don't trigger OS camera and microphone permission prompts for fake devices (used for tests). Differential Revision: https://phabricator.services.mozilla.com/D46893
browser/base/content/test/webrtc/browser.ini
browser/modules/webrtcUI.jsm
--- a/browser/base/content/test/webrtc/browser.ini
+++ b/browser/base/content/test/webrtc/browser.ini
@@ -1,36 +1,31 @@
 [DEFAULT]
 support-files =
   get_user_media.html
   get_user_media_in_frame.html
   get_user_media_in_xorigin_frame.html
   get_user_media_content_script.js
   head.js
-skip-if = os == 'mac' # most tests permafail on macosx1014, see individual bugs
+
 [browser_devices_get_user_media.js]
-skip-if = fission || (os == "linux" && debug) || os == 'mac' # linux: bug 976544, macosx1014 intermittent due to 1259330
+skip-if = fission || (os == "linux" && debug) # linux: bug 976544
 [browser_devices_get_user_media_anim.js]
-skip-if = os == 'mac' # macosx1014 permafail, see 1565738
 [browser_devices_get_user_media_default_permissions.js]
-skip-if = os == 'mac' # macosx1014 fails due to 1567656
 [browser_devices_get_user_media_in_frame.js]
-skip-if = debug || os == 'mac' # bug 1369731, macosx1014 due to 1567746
+skip-if = debug # bug 1369731
 [browser_devices_get_user_media_in_xorigin_frame.js]
-skip-if = debug || os == 'mac' # bug 1369731, macosx1014 due to 1567746
+skip-if = debug # bug 1369731
 [browser_devices_get_user_media_multi_process.js]
-skip-if =
-  (debug && os == "win") || os == "mac" || # bug 1393761, macosx1014 due to 1568142
-  fission # Fails intermittently.
+skip-if = (debug && os == "win") || fission # bug 1393761, fission fails intermittently
 [browser_devices_get_user_media_paused.js]
-skip-if = (os == "win" && !debug) || (os =="linux" && !debug && bits == 64) || os == 'mac' # macosx1014 due to 1567735, Bug 1440900
+skip-if = (os == "win" && !debug) || (os =="linux" && !debug && bits == 64) # Bug 1440900
 [browser_devices_get_user_media_screen.js]
-skip-if = (os == 'linux') || os == 'mac' # Bug 1503991, macosx1014 due to 1568135
+skip-if = (os == 'linux') # Bug 1503991
 [browser_devices_get_user_media_tear_off_tab.js]
 skip-if = fission
 [browser_devices_get_user_media_unprompted_access.js]
 [browser_devices_get_user_media_unprompted_access_in_frame.js]
 [browser_devices_get_user_media_unprompted_access_tear_off_tab.js]
 skip-if = fission || (os == "win" && bits == 64) # win8: bug 1334752
 [browser_devices_get_user_media_unprompted_access_queue_request.js]
 [browser_webrtc_hooks.js]
 [browser_devices_get_user_media_queue_request.js]
-skip-if = os == 'mac' # macosx1014 due to 1568141
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -372,16 +372,23 @@ function denyRequestNoPermission(aBrowse
 }
 
 //
 // Check if we have permission to access the camera and or microphone at the
 // OS level. Triggers a request to access the device if access is needed and
 // the permission state has not yet been determined.
 //
 async function checkOSPermission(camNeeded, micNeeded) {
+  // Don't trigger OS permission requests for fake devices. Fake devices don't
+  // require OS permission and the dialogs are problematic in automated testing
+  // (where fake devices are used) because they require user interaction.
+  if (Services.prefs.getBoolPref("media.navigator.streams.fake", false)) {
+    return true;
+  }
+
   let camStatus = {},
     micStatus = {};
   OSPermissions.getMediaCapturePermissionState(camStatus, micStatus);
   if (camNeeded) {
     let camPermission = camStatus.value;
     let camAccessible = await checkAndGetOSPermission(
       camPermission,
       OSPermissions.requestVideoCapturePermission