Closed Bug 1390521 Opened 2 years ago Closed 2 years ago

Set prefs to automate gUM-prompts for more (WebRTC) web-platform tests


(Core :: WebRTC, defect, P1)




Tracking Status
firefox57 --- fixed


(Reporter: jib, Assigned: pehrsons)




(3 files)

+++ This bug was initially created as a clone of Bug #1376960 +++

Continue the good work of that bug for the webrtc WPT tests, e.g.


Several of the webrtc tests also rely on getUserMedia. Some of them are timing out right now, or worse intermittently going orange (bug 1388550).
Assignee: nobody → apehrson
Rank: 15
Blocks: 1393211, 1388550
I have the prefs to enable gUM set but there's something wrong as WPT is not picking them up: [1]

There are two prefs set for all webrtc wpt tests. One for disabling the permission prompt, one for enabling fake devices. I can reproduce the results on linux - no fake devices enabled, so for me it uses the physical camera and microphone instead. That is likely why it is passing on other platforms than Mac on try.

On linux I have also reproduced this in rr, and it's clear that `Preferences::GetBool("media.navigator.streams.fake")` (from [2]) returns false.

James, do you know of any issues with prefs in WPT? Any gotchas we could have missed?
To repro, apply the patch in [3] and run `./mach wpt testing/web-platform/tests/webrtc/RTCPeerConnection-addTrack.html`.
Check whether the mediacapture doorhanger or your camera light gets enabled. They shouldn't.

FWIW Setting the same prefs in my regular Nightly gives me fake devices just fine.

Flags: needinfo?(james)
I can see in rr that the first pref in the list ("media.navigator.permission.disabled":true) gets set initially. The other one doesn't. Putting the fake streams first doesn't help.

Is this because the permission pref is in libpref/init/all.js but the fake streams one isn't? Is that a bug?
I can confirm that adding "media.navigator.streams.fake" to all.js makes it work. It would still be nice to support other prefs, since there are some that we don't want exposed to about:config.
See Also: → 1395119
Seems like bug 1395119 is the underlying cause here, so clearing this needinfo.
Flags: needinfo?(james)
Comment on attachment 8902177 [details]
Bug 1390521 - Use fake streams and disable the prompt for all WebRTC WPT tests.
Attachment #8902177 - Flags: review?(jib) → review+
Comment on attachment 8902178 [details]
Bug 1390521 - Enable tests.

Attachment #8902178 - Flags: review?(jib) → review+
Comment on attachment 8902179 [details]
Bug 1390521 - Expose pref "media.navigator.streams.fake" in all.js.

I guess it doesn't hurt to show this one in about:config
Attachment #8902179 - Flags: review?(jib) → review+
Pushed by
Use fake streams and disable the prompt for all WebRTC WPT tests. r=jib
Enable tests. r=jib
Expose pref "media.navigator.streams.fake" in all.js. r=jib
You need to log in before you can comment on or make changes to this bug.