Closed Bug 1390521 Opened 2 years ago Closed 2 years ago

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

Categories

(Core :: WebRTC, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jib, Assigned: pehrsons)

References

Details

Attachments

(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.

  testing/web-platform/tests/webrtc/RTCPeerConnection-addTrack.html
  etc.

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
Status: NEW → ASSIGNED
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.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=b252923f87266e3b510641a9a0d9c66a1af9e802&selectedJob=126431426
[2] http://searchfox.org/mozilla-central/rev/18c16ebf818abb86805ce08a6e537e4cd826f044/dom/media/MediaManager.cpp#2452
[3] https://hg.mozilla.org/try/rev/8508c0dcf559f18f5ecef909443b04933573aa72
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.

https://reviewboard.mozilla.org/r/173648/#review180078
Attachment #8902177 - Flags: review?(jib) → review+
Comment on attachment 8902178 [details]
Bug 1390521 - Enable tests.

https://reviewboard.mozilla.org/r/173650/#review180086

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

https://reviewboard.mozilla.org/r/173652/#review180088

I guess it doesn't hurt to show this one in about:config
Attachment #8902179 - Flags: review?(jib) → review+
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/dc3195f3e50f
Use fake streams and disable the prompt for all WebRTC WPT tests. r=jib
https://hg.mozilla.org/integration/autoland/rev/50b20d466c17
Enable tests. r=jib
https://hg.mozilla.org/integration/autoland/rev/5456ea5ec717
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.