Bug 1271669 - Ensure media element flow is tested for all local tracks. r?jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 18 May 2016 16:47:27 +0200
changeset 369107 d58842e4a678f77b39de66b4575fc2b6a76ecc71
parent 369106 2806803adf41e2463226421e9be602a9ba87343e
child 369108 8dd6d585a96df1db0cb485d72e84ec7dd24ad90d
push id18740
push userpehrsons@gmail.com
push dateFri, 20 May 2016 08:44:08 +0000
reviewersjib
bugs1271669
milestone49.0a1
Bug 1271669 - Ensure media element flow is tested for all local tracks. r?jib MozReview-Commit-ID: 6tfp0hHlxlY
dom/media/tests/mochitest/pc.js
--- 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|.
    *