Bug 1431056 - Stop using fake constraints in a media mochitest. r?pehrsons draft
authorAlex Chronopoulos <achronop@gmail.com>
Wed, 14 Feb 2018 12:26:12 +0200
changeset 754803 e52e2ec322af79831921b518e6be10ced51de086
parent 753761 cb9b9f2707a33a1a85d5c2e74e2cd75a8afa337e
push id99004
push userachronop@gmail.com
push dateWed, 14 Feb 2018 10:26:46 +0000
reviewerspehrsons
bugs1431056
milestone60.0a1
Bug 1431056 - Stop using fake constraints in a media mochitest. r?pehrsons MozReview-Commit-ID: 8vhrSvOKfIR
dom/media/tests/mochitest/test_peerConnection_replaceTrack.html
--- a/dom/media/tests/mochitest/test_peerConnection_replaceTrack.html
+++ b/dom/media/tests/mochitest/test_peerConnection_replaceTrack.html
@@ -34,18 +34,17 @@
     ok(sender, "We have a sender for video");
     ok(allLocalStreamsHaveSender(pc),
        "Shouldn't have any local streams without a corresponding sender");
     ok(allRemoteStreamsHaveReceiver(pc),
        "Shouldn't have any remote streams without a corresponding receiver");
 
     var newTrack;
     var audiotrack;
-    // Remove fake constraints with Bug 1431056
-    return getUserMedia({fake:true, video:true, audio:true})
+    return getUserMedia({video:true, audio:true})
       .then(newStream => {
         window.grip = newStream;
         newTrack = newStream.getVideoTracks()[0];
         audiotrack = newStream.getAudioTracks()[0];
         isnot(newTrack, sender.track, "replacing with a different track");
         ok(!pc.getLocalStreams().some(s => s == newStream),
            "from a different stream");
         // Use wrapper function, since it updates expected tracks
@@ -65,18 +64,17 @@
                 e => is(e.name, "TypeError",
                         "replacing with different kind should fail"));
       });
   }
 
   runNetworkTest(function () {
     test = new PeerConnectionTest();
     test.audioCtx = new AudioContext();
-    // Remove fake constraints with Bug 1431056
-    test.setMediaConstraints([{fake: true, video: true, audio: true}], [{fake: true, video: true}]);
+    test.setMediaConstraints([{video: true, audio: true}], [{video: true}]);
     test.chain.removeAfter("PC_REMOTE_WAIT_FOR_MEDIA_FLOW");
 
     // Test replaceTrack on pcRemote separately since it's video only.
     test.chain.append([
       function PC_REMOTE_VIDEOONLY_REPLACE_VIDEOTRACK(test) {
         return replacetest(test.pcRemote);
       },
       function PC_LOCAL_NEW_VIDEOTRACK_WAIT_FOR_MEDIA_FLOW(test) {