Bug 1431056 - Stop using fake constraints in a media mochitest. r?pehrsons
MozReview-Commit-ID: 8vhrSvOKfIR
--- 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) {