tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 8aa578e2ffdc1e7edb60e102fa60dbe9c48c15d0
parent b2791ba9793fd31eb0b6b35188b1edc4a8e7899e
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:
Mbrowser/base/content/test/webrtc/browser_devices_get_user_media_paused.js | 6+++++-
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);