Bug 1271669 - Ensure media element flow is tested for all local tracks. r?jib
MozReview-Commit-ID: 6tfp0hHlxlY
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -872,17 +872,20 @@ PeerConnectionWrapper.prototype = {
ok(track.id, "track has id");
ok(track.kind, "track has kind");
ok(stream.id, "stream has id");
this.expectedLocalTrackInfoById[track.id] = {
type: track.kind,
streamId: stream.id,
};
- this.ensureMediaElement(track, stream, "local");
+ // This will create one media element per track, which might not be how
+ // we set up things with the RTCPeerConnection. It's the only way
+ // we can ensure all sent tracks are flowing however.
+ this.ensureMediaElement(track, new MediaStream([track]), "local");
return this.observedNegotiationNeeded;
},
/**
* Callback when we get local media. Also an appropriate HTML media element
* will be created, which may be obtained later with |getMediaElement|.
*