commit 0dc61042220487712e3a7cdb9b7278177b1d1b40
parent 903b2ec85840bfe79c003c8de14bc276e60a5ce0
Author: Andreas Pehrson <apehrson@mozilla.com>
Date: Tue, 11 Nov 2025 08:20:26 +0000
Bug 1771789 - Update browser-chrome recording-device-events expectations. r=jib
With deep cloning, instead of a single device listener for all tracks
originating from the same source, there is one per track. A device listener
isn't aware of other device listeners when notifying chrome, which means the
number of recording-device-events messages has changed.
Note that setting a track's enabled attribute triggers the chrome notification
in an async task. Stopping a track on the other hand triggers the chrome
notification synchronously. Multiple notifications in a single task are
coalesced into a single chrome event (from stable state).
Differential Revision: https://phabricator.services.mozilla.com/D271079
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/browser/base/content/test/webrtc/browser_devices_get_user_media_paused.js b/browser/base/content/test/webrtc/browser_devices_get_user_media_paused.js
@@ -245,10 +245,14 @@ var gTests = [
// Clone audio and video, their state will be enabled
await cloneTracks(true, true);
+ observerPromise = expectObserverCalled("recording-device-events", 2);
+
// Disable both audio and video.
await setTrackEnabled(false, false);
- observerPromise = expectObserverCalled("recording-device-events", 2);
+ await observerPromise;
+
+ observerPromise = expectObserverCalled("recording-device-events");
// Stop the clones. This should disable the sharing indicators.
await stopClonedTracks(true, true);