Closed Bug 1479840 Opened 6 years ago Closed 6 years ago

Test that enumerateDevices() neither resolves nor rejects when navigated away.

Categories

(Core :: WebRTC: Audio/Video, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: jib, Assigned: achronop)

References

Details

Attachments

(3 files)

Specs don't really cover this, and there's some discussion over what the best pattern here is, but this is our current by-design behavior, so we should write a mochitest for it.
Attached file parent.html
Attached file iframe.html
I can repro locally using the samples attached. The enumerate method in MediaManager is exiting from the following point:
https://searchfox.org/mozilla-central/source/dom/media/MediaManager.cpp#3289
Create a new mochitest that suspends enumerateDevice(). This can happen when the current window navigates away. This is achieved by using an iframe to enumerate devices and clearing the iframe window before the promise is resolved.
Attachment #8997371 - Attachment description: Bug 1479840 - Test that enumerateDevices() neither resolves nor rejects when window is navigated away. r?jib → Bug 1479840 - Test that enumerateDevices promse remains peding when window navigates away. r?jib
Comment on attachment 8997371 [details]
Bug 1479840 - Test that enumerateDevices promse remains peding when window navigates away. r?jib

Jan-Ivar Bruaroey [:jib] (needinfo? me) has approved the revision.
Attachment #8997371 - Flags: review+
Pushed by achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ec6061e71da
Test that enumerateDevices promse remains peding when window navigates away. r=jib
https://hg.mozilla.org/mozilla-central/rev/9ec6061e71da
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: